pub enum Component<'a> {
Text(TextComponent<'a>),
Translatable(TranslatableComponent<'a>),
KeyBind(KeyBindComponent<'a>),
Score(ScoreComponent<'a>),
Selector(SelectorComponent<'a>),
Base(BaseComponent<'a>),
}Variants§
Text(TextComponent<'a>)
Translatable(TranslatableComponent<'a>)
KeyBind(KeyBindComponent<'a>)
Score(ScoreComponent<'a>)
Selector(SelectorComponent<'a>)
Base(BaseComponent<'a>)
Trait Implementations§
Source§impl<'de, 'a> Deserialize<'de> for Component<'a>
impl<'de, 'a> Deserialize<'de> for Component<'a>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'a> From<BaseComponent<'a>> for Component<'a>
impl<'a> From<BaseComponent<'a>> for Component<'a>
Source§fn from(component: BaseComponent<'a>) -> Self
fn from(component: BaseComponent<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<KeyBindComponent<'a>> for Component<'a>
impl<'a> From<KeyBindComponent<'a>> for Component<'a>
Source§fn from(component: KeyBindComponent<'a>) -> Self
fn from(component: KeyBindComponent<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<ScoreComponent<'a>> for Component<'a>
impl<'a> From<ScoreComponent<'a>> for Component<'a>
Source§fn from(component: ScoreComponent<'a>) -> Self
fn from(component: ScoreComponent<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<SelectorComponent<'a>> for Component<'a>
impl<'a> From<SelectorComponent<'a>> for Component<'a>
Source§fn from(component: SelectorComponent<'a>) -> Self
fn from(component: SelectorComponent<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<TextComponent<'a>> for Component<'a>
impl<'a> From<TextComponent<'a>> for Component<'a>
Source§fn from(component: TextComponent<'a>) -> Self
fn from(component: TextComponent<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<TranslatableComponent<'a>> for Component<'a>
impl<'a> From<TranslatableComponent<'a>> for Component<'a>
Source§fn from(component: TranslatableComponent<'a>) -> Self
fn from(component: TranslatableComponent<'a>) -> Self
Converts to this type from the input type.
impl<'a> StructuralPartialEq for Component<'a>
Auto Trait Implementations§
impl<'a> Freeze for Component<'a>
impl<'a> RefUnwindSafe for Component<'a>
impl<'a> Send for Component<'a>
impl<'a> Sync for Component<'a>
impl<'a> Unpin for Component<'a>
impl<'a> UnwindSafe for Component<'a>
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§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 more