pub(crate) struct CommandTextResolver<'a, S: ?Sized = CommandSource> {
source: &'a S,
default_scoreboard_name: Option<String>,
}Expand description
Resolves selectors, scores, and NBT against one command source.
Fields§
§source: &'a S§default_scoreboard_name: Option<String>Implementations§
Source§impl<'a> CommandTextResolver<'a, CommandSource>
impl<'a> CommandTextResolver<'a, CommandSource>
pub(crate) fn with_entity_override( source: &'a CommandSource, entity: &dyn Entity, ) -> Self
Source§impl<S> CommandTextResolver<'_, S>where
S: CommandTextResolutionSource + ?Sized,
impl<S> CommandTextResolver<'_, S>where
S: CommandTextResolutionSource + ?Sized,
fn resolve_score( &self, selector: &str, objective: &str, ) -> Result<TextComponent, CommandSyntaxError>
fn resolve_nbt( &self, path: &str, interpret: bool, plain: bool, separator: Option<&TextComponent>, source: &NbtSource, recursion_depth: usize, ) -> Result<TextComponent, CommandSyntaxError>
Trait Implementations§
Source§impl<S> TryTextResolutor for CommandTextResolver<'_, S>where
S: CommandTextResolutionSource + ?Sized,
impl<S> TryTextResolutor for CommandTextResolver<'_, S>where
S: CommandTextResolutionSource + ?Sized,
type Error = CommandSyntaxError
fn try_resolve_content( &self, resolvable: &Resolvable, recursion_depth: usize, ) -> Result<TextComponent, Self::Error>
fn try_resolve_custom( &self, data: &CustomData, ) -> Result<Option<TextComponent>, Self::Error>
fn try_resolve_other( &self, content: &Content, ) -> Result<TextComponent, Self::Error>
Auto Trait Implementations§
impl<'a, S> Freeze for CommandTextResolver<'a, S>where
S: ?Sized,
impl<'a, S> RefUnwindSafe for CommandTextResolver<'a, S>where
S: RefUnwindSafe + ?Sized,
impl<'a, S> Send for CommandTextResolver<'a, S>
impl<'a, S> Sync for CommandTextResolver<'a, S>
impl<'a, S> Unpin for CommandTextResolver<'a, S>where
S: ?Sized,
impl<'a, S> UnsafeUnpin for CommandTextResolver<'a, S>where
S: ?Sized,
impl<'a, S> UnwindSafe for CommandTextResolver<'a, S>where
S: RefUnwindSafe + ?Sized,
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<>>