pub struct CommandContextBuilder<'a, S> {
pub arguments: HashMap<String, ParsedArgument>,
pub root: Arc<RwLock<CommandNode<S>>>,
pub nodes: Vec<ParsedCommandNode<S>>,
pub dispatcher: &'a CommandDispatcher<S>,
pub source: Arc<S>,
pub command: Command<S>,
pub child: Option<Rc<CommandContextBuilder<'a, S>>>,
pub range: StringRange,
pub modifier: Option<Arc<RedirectModifier<S>>>,
pub forks: bool,
}
Fields§
§arguments: HashMap<String, ParsedArgument>
§root: Arc<RwLock<CommandNode<S>>>
§nodes: Vec<ParsedCommandNode<S>>
§dispatcher: &'a CommandDispatcher<S>
§source: Arc<S>
§command: Command<S>
§child: Option<Rc<CommandContextBuilder<'a, S>>>
§range: StringRange
§modifier: Option<Arc<RedirectModifier<S>>>
§forks: bool
Implementations§
Source§impl<'a, S> CommandContextBuilder<'a, S>
impl<'a, S> CommandContextBuilder<'a, S>
pub fn new( dispatcher: &'a CommandDispatcher<S>, source: Arc<S>, root_node: Arc<RwLock<CommandNode<S>>>, start: usize, ) -> Self
pub fn with_command(&mut self, command: &Command<S>) -> &Self
pub fn with_child(&mut self, child: Rc<CommandContextBuilder<'a, S>>) -> &Self
pub fn with_argument(&mut self, name: &str, argument: ParsedArgument) -> &Self
pub fn with_node( &mut self, node: Arc<RwLock<CommandNode<S>>>, range: StringRange, ) -> &Self
pub fn build(&self, input: &str) -> CommandContext<S>
pub fn find_suggestion_context(&self, cursor: usize) -> SuggestionContext<S>
Trait Implementations§
Source§impl<S> Clone for CommandContextBuilder<'_, S>
impl<S> Clone for CommandContextBuilder<'_, S>
Auto Trait Implementations§
impl<'a, S> Freeze for CommandContextBuilder<'a, S>
impl<'a, S> !RefUnwindSafe for CommandContextBuilder<'a, S>
impl<'a, S> !Send for CommandContextBuilder<'a, S>
impl<'a, S> !Sync for CommandContextBuilder<'a, S>
impl<'a, S> Unpin for CommandContextBuilder<'a, S>
impl<'a, S> !UnwindSafe for CommandContextBuilder<'a, 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)