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