pub struct CommandContext<S> {
pub source: Arc<S>,
/* private fields */
}
Expand description
A built CommandContextBuilder
.
Fields§
§source: Arc<S>
Implementations§
Source§impl<S> CommandContext<S>
impl<S> CommandContext<S>
pub fn copy_for(&self, source: Arc<S>) -> Self
pub fn child(&self) -> Option<&CommandContext<S>>
pub fn last_child(&self) -> &CommandContext<S>
pub fn command(&self) -> &Command<S>
pub fn argument(&self, name: &str) -> Option<&dyn Any>
pub fn redirect_modifier(&self) -> Option<&RedirectModifier<S>>
pub fn range(&self) -> &StringRange
pub fn input(&self) -> &str
pub fn root_node(&self) -> &Arc<RwLock<CommandNode<S>>>
pub fn nodes(&self) -> &[ParsedCommandNode<S>]
pub fn has_nodes(&self) -> bool
pub fn is_forked(&self) -> bool
Trait Implementations§
Source§impl<S> Clone for CommandContext<S>
impl<S> Clone for CommandContext<S>
Auto Trait Implementations§
impl<S> Freeze for CommandContext<S>
impl<S> !RefUnwindSafe for CommandContext<S>
impl<S> !Send for CommandContext<S>
impl<S> !Sync for CommandContext<S>
impl<S> Unpin for CommandContext<S>
impl<S> !UnwindSafe for CommandContext<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