[][src]Enum twitchchat::decode::Prefix

pub enum Prefix<'t> {
    User {
        nick: Cow<'t, str>,
    },
    Server {
        host: Cow<'t, str>,
    },
}

Prefix is the sender of a message

Variants

User

A user sent this message

Fields of User

nick: Cow<'t, str>

Name of the user

Server

The server sent this message

Fields of Server

host: Cow<'t, str>

Name of the server

Implementations

impl<'t> Prefix<'t>[src]

pub fn nick(&'t self) -> Option<&Cow<'t, str>>[src]

The user name in this prefix

This is the name of the user if a user had sent the message

pub fn host(&'t self) -> Option<&Cow<'t, str>>[src]

The host name in this prefix

This is the name of the server if the server had sent the message

Trait Implementations

impl<'t> AsOwned for Prefix<'t>[src]

type Owned = Prefix<'static>

The owned type

impl<'t> Clone for Prefix<'t>[src]

impl<'t> Debug for Prefix<'t>[src]

impl<'de, 't> Deserialize<'de> for Prefix<'t>[src]

impl<'t> PartialEq<Prefix<'t>> for Prefix<'t>[src]

impl<'t> Serialize for Prefix<'t>[src]

impl<'t> StructuralPartialEq for Prefix<'t>[src]

Auto Trait Implementations

impl<'t> RefUnwindSafe for Prefix<'t>

impl<'t> Send for Prefix<'t>

impl<'t> Sync for Prefix<'t>

impl<'t> Unpin for Prefix<'t>

impl<'t> UnwindSafe for Prefix<'t>

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: for<'de> Deserialize<'de>, 
[src]

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.