pub enum NetworkResponse {
MessageSent,
ConnectedPeers {
peers: Vec<PeerId>,
},
Error(String),
MailboxPutResult {
success: bool,
},
MailboxMessages {
messages: Vec<EncryptedMessage>,
},
MailboxAckResult {
deleted: usize,
},
}Expand description
A response from the NetworkLayer.
Variants§
MessageSent
A message was successfully sent.
ConnectedPeers
A list of connected peers.
Error(String)
An error occurred.
MailboxPutResult
The result of a mailbox put operation.
MailboxMessages
A list of messages fetched from a mailbox.
Fields
§
messages: Vec<EncryptedMessage>The list of fetched messages.
MailboxAckResult
The result of a mailbox ack operation.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NetworkResponse
impl RefUnwindSafe for NetworkResponse
impl Send for NetworkResponse
impl Sync for NetworkResponse
impl Unpin for NetworkResponse
impl UnwindSafe for NetworkResponse
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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