Struct fidl_contrib::protocol_connector::ProtocolSender
source · pub struct ProtocolSender<Msg> { /* private fields */ }
Expand description
A ProtocolSender wraps around an mpsc::Sender
object that is used to send
messages to a running ProtocolConnector instance.
Implementations§
source§impl<Msg> ProtocolSender<Msg>
impl<Msg> ProtocolSender<Msg>
sourcepub fn new(sender: Sender<Msg>) -> Self
pub fn new(sender: Sender<Msg>) -> Self
Create a new ProtocolSender which will use sender
to send messages.
sourcepub fn send(&mut self, message: Msg) -> ProtocolSenderStatus
pub fn send(&mut self, message: Msg) -> ProtocolSenderStatus
Send a message to the underlying channel.
When the sender enters or exits a backoff state, it will log an error, but no other feedback will be provided to the caller.
Trait Implementations§
source§impl<Msg: Clone> Clone for ProtocolSender<Msg>
impl<Msg: Clone> Clone for ProtocolSender<Msg>
source§fn clone(&self) -> ProtocolSender<Msg>
fn clone(&self) -> ProtocolSender<Msg>
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<Msg> !RefUnwindSafe for ProtocolSender<Msg>
impl<Msg> Send for ProtocolSender<Msg>where Msg: Send,
impl<Msg> Sync for ProtocolSender<Msg>where Msg: Send,
impl<Msg> Unpin for ProtocolSender<Msg>
impl<Msg> !UnwindSafe for ProtocolSender<Msg>
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