pub struct Agent { /* private fields */ }Expand description
Agent is low-level abstraction over transaction list that handles concurrency and time outs (via Collect call).
Implementations§
Source§impl Agent
impl Agent
Sourcepub fn handle_event(&mut self, client_agent: ClientAgent) -> Result<()>
pub fn handle_event(&mut self, client_agent: ClientAgent) -> Result<()>
Applies an agent command: start, stop, process a message, collect timeouts, or close.
§Errors
Fails if the agent is closed, or a transaction id is already in use.
Sourcepub fn poll_timeout(&mut self) -> Option<Instant>
pub fn poll_timeout(&mut self) -> Option<Instant>
When the agent next needs ClientAgent::Collect, or None with nothing outstanding.
Sourcepub fn poll_event(&mut self) -> Option<Event>
pub fn poll_event(&mut self) -> Option<Event>
The next transaction event, or None when there is nothing to report.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Agent
impl RefUnwindSafe for Agent
impl Send for Agent
impl Sync for Agent
impl Unpin for Agent
impl UnsafeUnpin for Agent
impl UnwindSafe for Agent
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