pub struct CommandContextBuilder<'a, S, R> {
pub arguments: HashMap<String, ParsedArgument>,
pub root: Arc<RwLock<CommandNode<S, R>>>,
pub nodes: Vec<ParsedCommandNode<S, R>>,
pub dispatcher: &'a CommandDispatcher<S, R>,
pub source: Arc<S>,
pub command: Command<S, R>,
pub child: Option<Rc<CommandContextBuilder<'a, S, R>>>,
pub range: StringRange,
pub modifier: Option<Arc<RedirectModifier<S, R>>>,
pub forks: bool,
}Fields§
§arguments: HashMap<String, ParsedArgument>§root: Arc<RwLock<CommandNode<S, R>>>§nodes: Vec<ParsedCommandNode<S, R>>§dispatcher: &'a CommandDispatcher<S, R>§source: Arc<S>§command: Command<S, R>§child: Option<Rc<CommandContextBuilder<'a, S, R>>>§range: StringRange§modifier: Option<Arc<RedirectModifier<S, R>>>§forks: boolImplementations§
Source§impl<'a, S, R> CommandContextBuilder<'a, S, R>
impl<'a, S, R> CommandContextBuilder<'a, S, R>
pub fn new( dispatcher: &'a CommandDispatcher<S, R>, source: Arc<S>, root_node: Arc<RwLock<CommandNode<S, R>>>, start: usize, ) -> Self
pub fn with_command(&mut self, command: &Command<S, R>) -> &Self
pub fn with_child( &mut self, child: Rc<CommandContextBuilder<'a, S, R>>, ) -> &Self
pub fn with_argument(&mut self, name: &str, argument: ParsedArgument) -> &Self
pub fn with_node( &mut self, node: Arc<RwLock<CommandNode<S, R>>>, range: StringRange, ) -> &Self
pub fn build(&self, input: &str) -> CommandContext<S, R>
pub fn find_suggestion_context(&self, cursor: usize) -> SuggestionContext<S, R>
Trait Implementations§
Source§impl<S, R> Clone for CommandContextBuilder<'_, S, R>
impl<S, R> Clone for CommandContextBuilder<'_, S, R>
Auto Trait Implementations§
impl<'a, S, R> !RefUnwindSafe for CommandContextBuilder<'a, S, R>
impl<'a, S, R> !Send for CommandContextBuilder<'a, S, R>
impl<'a, S, R> !Sync for CommandContextBuilder<'a, S, R>
impl<'a, S, R> !UnwindSafe for CommandContextBuilder<'a, S, R>
impl<'a, S, R> Forget for CommandContextBuilder<'a, S, R>
impl<'a, S, R> Freeze for CommandContextBuilder<'a, S, R>where
*const u8 is !null: Freeze,
PhantomData<(String, ParsedArgument)>: Freeze,
*const ArcInner<RwLock<RawRwLock, CommandNode<S, R>>> is !null: Freeze,
PhantomData<ArcInner<RwLock<RawRwLock, CommandNode<S, R>>>>: Freeze,
PhantomData<ParsedCommandNode<S, R>>: Freeze,
&'a CommandDispatcher<S, R>: Freeze,
*const ArcInner<S> is !null: Freeze,
PhantomData<ArcInner<S>>: Freeze,
*const ArcInner<dyn Fn(&CommandContext<S, R>) -> Result<R, CommandSyntaxError> + Sync + Send> is !null: Freeze,
PhantomData<ArcInner<dyn Fn(&CommandContext<S, R>) -> Result<R, CommandSyntaxError> + Sync + Send>>: Freeze,
*const RcInner<CommandContextBuilder<'a, S, R>> is !null: Freeze,
PhantomData<RcInner<CommandContextBuilder<'a, S, R>>>: Freeze,
*const ArcInner<dyn Fn(&CommandContext<S, R>) -> Result<Vec<Arc<S>>, CommandSyntaxError> + Sync + Send> is !null: Freeze,
PhantomData<ArcInner<dyn Fn(&CommandContext<S, R>) -> Result<Vec<Arc<S>>, CommandSyntaxError> + Sync + Send>>: Freeze,
impl<'a, S, R> Move for CommandContextBuilder<'a, S, R>
impl<'a, S, R> Unpin for CommandContextBuilder<'a, S, R>where
*const u8 is !null: Unpin,
Arc<dyn Any>: Unpin,
Arc<RwLock<RawRwLock, CommandNode<S, R>>>: Unpin,
&'a CommandDispatcher<S, R>: Unpin,
Arc<S>: Unpin,
Arc<dyn Fn(&CommandContext<S, R>) -> Result<R, CommandSyntaxError> + Sync + Send>: Unpin,
Rc<CommandContextBuilder<'a, S, R>>: Unpin,
Arc<dyn Fn(&CommandContext<S, R>) -> Result<Vec<Arc<S>>, CommandSyntaxError> + Sync + Send>: Unpin,
impl<'a, S, R> UnsafeUnpin for CommandContextBuilder<'a, S, R>where
*const u8 is !null: UnsafeUnpin,
PhantomData<(String, ParsedArgument)>: UnsafeUnpin,
*const ArcInner<RwLock<RawRwLock, CommandNode<S, R>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<RwLock<RawRwLock, CommandNode<S, R>>>>: UnsafeUnpin,
PhantomData<ParsedCommandNode<S, R>>: UnsafeUnpin,
&'a CommandDispatcher<S, R>: UnsafeUnpin,
*const ArcInner<S> is !null: UnsafeUnpin,
PhantomData<ArcInner<S>>: UnsafeUnpin,
*const ArcInner<dyn Fn(&CommandContext<S, R>) -> Result<R, CommandSyntaxError> + Sync + Send> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn Fn(&CommandContext<S, R>) -> Result<R, CommandSyntaxError> + Sync + Send>>: UnsafeUnpin,
*const RcInner<CommandContextBuilder<'a, S, R>> is !null: UnsafeUnpin,
PhantomData<RcInner<CommandContextBuilder<'a, S, R>>>: UnsafeUnpin,
*const ArcInner<dyn Fn(&CommandContext<S, R>) -> Result<Vec<Arc<S>>, CommandSyntaxError> + Sync + Send> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn Fn(&CommandContext<S, R>) -> Result<Vec<Arc<S>>, CommandSyntaxError> + Sync + Send>>: UnsafeUnpin,
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,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<A, B> Interchangeable<A> for B
impl<A, B> Interchangeable<A> for B
fn interchangeable_into(self) -> A
fn interchangeable_from(other: A) -> B
§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Converts this type into the system output type.
§impl<T> Template for T
impl<T> Template for T
§fn build_template(
&self,
_context: &mut TemplateContext<'_, '_>,
) -> Result<<T as Template>::Output, BevyError>
fn build_template( &self, _context: &mut TemplateContext<'_, '_>, ) -> Result<<T as Template>::Output, BevyError>
Uses this template and the given
entity context to produce a [Template::Output].§fn clone_template(&self) -> T
fn clone_template(&self) -> T
Clones this template. See
Clone.