pub struct AgentSender { /* private fields */ }Expand description
Cloneable command side of a running agent.
Self::send and Self::submit never wait for queue capacity: they return
Error::Busy when full and Error::Stopped when disconnected. Successful
enqueueing does not mean the operation was accepted; consume the event stream
for its correlated outcome.
Dropping all strong senders requests shutdown. Use Agent::into_parts to
release the command half while draining AgentEvents until it closes.
Implementations§
Source§impl AgentSender
impl AgentSender
Sourcepub fn downgrade(&self) -> WeakAgentSender
pub fn downgrade(&self) -> WeakAgentSender
Returns a handle that does not keep the agent submission channel open.
Sourcepub fn send(&self, submission: Submission) -> Result<()>
pub fn send(&self, submission: Submission) -> Result<()>
Sends a submission with a caller-controlled correlation ID.
Trait Implementations§
Source§impl Clone for AgentSender
impl Clone for AgentSender
Source§fn clone(&self) -> AgentSender
fn clone(&self) -> AgentSender
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 AgentSender
impl RefUnwindSafe for AgentSender
impl Send for AgentSender
impl Sync for AgentSender
impl Unpin for AgentSender
impl UnsafeUnpin for AgentSender
impl UnwindSafe for AgentSender
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