[][src]Enum minecraft_chat::Payload

pub enum Payload {
    Text {
        text: String,
    },
    Translation {
        translate: String,
        with: Vec<Message>,
    },
    Keybind {
        keybind: String,
    },
    Score {
        name: String,
        objective: String,
        value: String,
    },
    Selector {
        selector: String,
    },
}

Variants

Text

Fields of Text

text: String
Translation

Fields of Translation

translate: Stringwith: Vec<Message>
Keybind

Fields of Keybind

keybind: String
Score

Fields of Score

name: Stringobjective: Stringvalue: String
Selector

Fields of Selector

selector: String

Methods

impl Payload[src]

pub fn text(text: &str) -> Self[src]

pub fn translation(translate: &str, with: Vec<Message>) -> Self[src]

pub fn keybind(keybind: &str) -> Self[src]

pub fn score(name: &str, objective: &str, value: &str) -> Self[src]

pub fn selector(selector: &str) -> Self[src]

Trait Implementations

impl Debug for Payload[src]

impl<'de> Deserialize<'de> for Payload[src]

impl Eq for Payload[src]

impl PartialEq<Payload> for Payload[src]

impl Serialize for Payload[src]

impl StructuralEq for Payload[src]

impl StructuralPartialEq for Payload[src]

Auto Trait Implementations

impl RefUnwindSafe for Payload

impl Send for Payload

impl Sync for Payload

impl Unpin for Payload

impl UnwindSafe for Payload

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.