pub(crate) trait CommandTextResolutionSource {
// Required methods
fn selector_display_names(
&self,
selector: &str,
) -> Result<Vec<TextComponent>, CommandSyntaxError>;
fn score_selector_names(
&self,
selector: &str,
) -> Result<Option<Vec<String>>, CommandSyntaxError>;
fn score(
&self,
holder: &str,
objective: &str,
) -> Result<Option<i32>, CommandSyntaxError>;
fn nbt_source(
&self,
source: &NbtSource,
) -> Result<Vec<NbtTag>, CommandSyntaxError>;
}Required Methods§
fn selector_display_names( &self, selector: &str, ) -> Result<Vec<TextComponent>, CommandSyntaxError>
fn score_selector_names( &self, selector: &str, ) -> Result<Option<Vec<String>>, CommandSyntaxError>
fn score( &self, holder: &str, objective: &str, ) -> Result<Option<i32>, CommandSyntaxError>
fn nbt_source( &self, source: &NbtSource, ) -> Result<Vec<NbtTag>, CommandSyntaxError>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".