Struct shell_creator::ShellCommand
source · pub struct ShellCommand { /* private fields */ }Implementations
sourceimpl ShellCommand
impl ShellCommand
pub fn new(name: &str) -> ShellCommand
pub fn trigger_action(&mut self, shell: &mut Console) -> Result<(), String>
pub fn set_action(
&mut self,
action: Box<dyn FnMut(&mut Console) -> Result<(), String>>
)
pub fn with_action(
self,
action: Box<dyn FnMut(&mut Console) -> Result<(), String>>
) -> ShellCommand
pub fn set_name(&mut self, name: &str)
Trait Implementations
sourceimpl Default for ShellCommand
impl Default for ShellCommand
Auto Trait Implementations
impl !RefUnwindSafe for ShellCommand
impl !Send for ShellCommand
impl !Sync for ShellCommand
impl Unpin for ShellCommand
impl !UnwindSafe for ShellCommand
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more