[][src]Enum twitchchat::irc::PrefixIndex

pub enum PrefixIndex {
    User {
        nick: MaybeOwnedIndex,
    },
    Server {
        host: MaybeOwnedIndex,
    },
}

Prefix is the sender of a message

Variants

User

A user prefix

Fields of User

nick: MaybeOwnedIndex

Index of the nickname

Server

A server prefix

Fields of Server

host: MaybeOwnedIndex

Index of the hostname

Implementations

impl PrefixIndex[src]

pub fn is_server(&self) -> bool[src]

Was this message from the server?

pub fn is_nick(&self) -> bool[src]

Was this message from a user?

pub fn nick_index(self) -> Option<MaybeOwnedIndex>[src]

Get the index of the nickname

pub fn host_index(self) -> Option<MaybeOwnedIndex>[src]

Get the index of the hostname

pub fn as_index(self) -> MaybeOwnedIndex[src]

Consumes this returning the index

Trait Implementations

impl Clone for PrefixIndex[src]

impl Copy for PrefixIndex[src]

impl Debug for PrefixIndex[src]

impl Eq for PrefixIndex[src]

impl Hash for PrefixIndex[src]

impl IntoOwned<'static> for PrefixIndex[src]

type Output = Self

The output type

impl Ord for PrefixIndex[src]

impl PartialEq<PrefixIndex> for PrefixIndex[src]

impl PartialOrd<PrefixIndex> for PrefixIndex[src]

impl StructuralEq for PrefixIndex[src]

impl StructuralPartialEq for PrefixIndex[src]

Auto Trait Implementations

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> 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.