Struct taple_core::message::MessageSender
source · pub struct MessageSender { /* private fields */ }
Expand description
Network MessageSender struct
Implementations§
source§impl MessageSender
impl MessageSender
Network MessageSender implementation
sourcepub fn new(
sender: Sender<Command>,
controller_id: KeyIdentifier,
signature_manager: SelfSignatureManager
) -> Self
pub fn new( sender: Sender<Command>, controller_id: KeyIdentifier, signature_manager: SelfSignatureManager ) -> Self
New MessageSender
sourcepub async fn send_message<T: TaskCommandContent>(
&self,
target: KeyIdentifier,
message: T
) -> Result<(), Error>
pub async fn send_message<T: TaskCommandContent>( &self, target: KeyIdentifier, message: T ) -> Result<(), Error>
Start listening in Taple netword
sourcepub async fn start_providing(
&mut self,
keys: Vec<String>
) -> Result<(), SendError<Command>>
pub async fn start_providing( &mut self, keys: Vec<String> ) -> Result<(), SendError<Command>>
Set node as a provider of keys
pub async fn bootstrap(&mut self) -> Result<(), SendError<Command>>
Trait Implementations§
source§impl Clone for MessageSender
impl Clone for MessageSender
source§fn clone(&self) -> MessageSender
fn clone(&self) -> MessageSender
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for MessageSender
impl Send for MessageSender
impl Sync for MessageSender
impl Unpin for MessageSender
impl !UnwindSafe for MessageSender
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more