pub struct CommandChain { /* private fields */ }Implementations§
Source§impl CommandChain
impl CommandChain
Sourcepub fn new<I>(cmds: I, timeout: Duration) -> Self
pub fn new<I>(cmds: I, timeout: Duration) -> Self
Creates a new CommandChain from an Iterator.
The order of the commands corresponds to the iterator’s
Sourcepub fn received_response(&mut self, identifier: &str) -> bool
pub fn received_response(&mut self, identifier: &str) -> bool
Removes the waiting state if the identifier matches that of the last issued command
Sourcepub fn poll(&mut self, now: Instant) -> NextCommand
pub fn poll(&mut self, now: Instant) -> NextCommand
Return the next command to process or None if done.
If the response timeout an error is returned instead
Trait Implementations§
Source§impl Debug for CommandChain
impl Debug for CommandChain
Auto Trait Implementations§
impl Freeze for CommandChain
impl RefUnwindSafe for CommandChain
impl Send for CommandChain
impl Sync for CommandChain
impl Unpin for CommandChain
impl UnwindSafe for CommandChain
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