pub(crate) struct ParseResults<'input, S, R = BrigadierRuntime>where
R: CommandRuntime<S>,{
context: ParsedCommandContext<S, R>,
reader: StringReader<'input>,
errors: Vec<ParseError>,
}Expand description
The best branch produced by parsing a command input.
Fields§
§context: ParsedCommandContext<S, R>§reader: StringReader<'input>§errors: Vec<ParseError>Implementations§
Source§impl<'input, S, R> ParseResults<'input, S, R>where
R: CommandRuntime<S>,
impl<'input, S, R> ParseResults<'input, S, R>where
R: CommandRuntime<S>,
pub(super) const fn new( context: ParsedCommandContext<S, R>, reader: StringReader<'input>, errors: Vec<ParseError>, ) -> Self
Sourcepub(crate) const fn reader(&self) -> &StringReader<'input>
pub(crate) const fn reader(&self) -> &StringReader<'input>
Returns the reader positioned where this branch stopped.
Sourcepub(crate) const fn context(&self) -> &ParsedCommandContext<S, R>
pub(crate) const fn context(&self) -> &ParsedCommandContext<S, R>
Returns the successfully parsed context.
Sourcepub(crate) fn errors(&self) -> &[ParseError]
pub(crate) fn errors(&self) -> &[ParseError]
Returns candidate errors from the stopping position.
pub(super) fn into_parts( self, ) -> (ParsedCommandContext<S, R>, StringReader<'input>, Vec<ParseError>)
Auto Trait Implementations§
impl<'input, S, R> Freeze for ParseResults<'input, S, R>
impl<'input, S, R> RefUnwindSafe for ParseResults<'input, S, R>where
S: RefUnwindSafe,
<R as CommandRuntime<S>>::Executor: RefUnwindSafe,
<R as CommandRuntime<S>>::Modifier: RefUnwindSafe,
<R as CommandRuntime<S>>::ArgumentValue: RefUnwindSafe,
impl<'input, S, R> Send for ParseResults<'input, S, R>
impl<'input, S, R> Sync for ParseResults<'input, S, R>
impl<'input, S, R> Unpin for ParseResults<'input, S, R>
impl<'input, S, R> UnsafeUnpin for ParseResults<'input, S, R>
impl<'input, S, R> UnwindSafe for ParseResults<'input, S, R>where
S: RefUnwindSafe,
<R as CommandRuntime<S>>::Executor: RefUnwindSafe,
<R as CommandRuntime<S>>::Modifier: RefUnwindSafe,
<R as CommandRuntime<S>>::ArgumentValue: UnwindSafe,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreWraps this value in an
Arc<SyncMutex<>>