pub struct MessageSender { /* private fields */ }
Expand description
Network MessageSender struct
Implementations§
Source§impl MessageSender
Network MessageSender implementation
impl MessageSender
Network MessageSender implementation
Sourcepub fn new(
sender: Sender<Command>,
controller_id: KeyIdentifier,
signature_manager: SelfSignatureManager,
derivator: DigestDerivator,
) -> Self
pub fn new( sender: Sender<Command>, controller_id: KeyIdentifier, signature_manager: SelfSignatureManager, derivator: DigestDerivator, ) -> 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 duplicate 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 Freeze for MessageSender
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more