pub struct CommandChain { /* private fields */ }Implementations§
Source§impl CommandChain
impl CommandChain
pub fn new() -> Self
Sourcepub fn append(&mut self, command: impl Into<Command>) -> &mut Self
pub fn append(&mut self, command: impl Into<Command>) -> &mut Self
Append a new command to the chain.
Sourcepub fn prepend(&mut self, command: impl Into<Command>) -> &mut Self
pub fn prepend(&mut self, command: impl Into<Command>) -> &mut Self
Prepend a new command to the chain.
Sourcepub fn execute(&self) -> Result<()>
pub fn execute(&self) -> Result<()>
Execute commands in sequence. If any command fails, the entire chain fails immediately.
pub fn commands(&self) -> &[Command]
Trait Implementations§
Source§impl Clone for CommandChain
impl Clone for CommandChain
Source§fn clone(&self) -> CommandChain
fn clone(&self) -> CommandChain
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 moreSource§impl Debug for CommandChain
impl Debug for CommandChain
Source§impl Default for CommandChain
impl Default for CommandChain
Source§fn default() -> CommandChain
fn default() -> CommandChain
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CommandChain
impl RefUnwindSafe for CommandChain
impl Send for CommandChain
impl Sync for CommandChain
impl Unpin for CommandChain
impl UnsafeUnpin 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