pub struct NodeSender { /* private fields */ }
Expand description
Send outgoing events to the associated node.
Implementations§
Source§impl NodeSender
impl NodeSender
Sourcepub fn is_closed(&self) -> bool
pub fn is_closed(&self) -> bool
Returns whether this channel is closed without needing a context.
Sourcepub fn send(&self, msg: OutgoingEvent) -> Result<(), NodeSenderError>
pub fn send(&self, msg: OutgoingEvent) -> Result<(), NodeSenderError>
Sends a message along this channel.
This is an unbounded sender, so this function differs from Sink::send
by ensuring the return type reflects that the channel is always ready to
receive messages.
§Errors
Returns a NodeSenderErrorType::Sending
error type if node is no
longer connected.
Auto Trait Implementations§
impl Freeze for NodeSender
impl RefUnwindSafe for NodeSender
impl Send for NodeSender
impl Sync for NodeSender
impl Unpin for NodeSender
impl UnwindSafe for NodeSender
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