pub struct BuiltIn<S> { /* private fields */ }
Expand description
A built-in command. This is a command provided at VM initialization.
This struct is simply a combination of a Command and a documentation string for the command. It is used when providing the built-in commands for a VM.
Implementations§
source§impl<S> BuiltIn<S>
impl<S> BuiltIn<S>
sourcepub fn new_expansion(t: ExpansionFn<S>) -> BuiltIn<S>
pub fn new_expansion(t: ExpansionFn<S>) -> BuiltIn<S>
Create a new expansion built-in command.
sourcepub fn new_execution(t: ExecutionFn<S>) -> BuiltIn<S>
pub fn new_execution(t: ExecutionFn<S>) -> BuiltIn<S>
Create a new expansion built-in command.
sourcepub fn new_variable(cmd: Command<S>) -> BuiltIn<S>
pub fn new_variable(cmd: Command<S>) -> BuiltIn<S>
Create a new variable built-in command.
pub fn with_doc(self, doc: &'static str) -> BuiltIn<S>
pub fn cmd(&self) -> &Command<S>
pub fn doc(&self) -> Option<&'static str>
Trait Implementations§
Auto Trait Implementations§
impl<S> RefUnwindSafe for BuiltIn<S>
impl<S> !Send for BuiltIn<S>
impl<S> !Sync for BuiltIn<S>
impl<S> Unpin for BuiltIn<S>
impl<S> UnwindSafe for BuiltIn<S>
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