[][src]Struct twitchchat::Badge

pub struct Badge<'t> {
    pub kind: BadgeKind<'t>,
    pub data: Cow<'t, str>,
}

Badges attached to a message

Fields

kind: BadgeKind<'t>

The kind of the Badge

data: Cow<'t, str>

Any associated data with the badge

May be:

  • version
  • number of bits
  • number of months needed for sub badge
  • etc

Implementations

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

pub fn parse(input: &'t str) -> Option<Badge<'t>>[src]

Tries to parse a badge from this message part

Trait Implementations

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

type Owned = Badge<'static>

The owned type

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

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

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

impl<'t> Eq for Badge<'t>[src]

impl<'t> Hash for Badge<'t>[src]

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

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

impl<'t> StructuralEq for Badge<'t>[src]

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

Auto Trait Implementations

impl<'t> RefUnwindSafe for Badge<'t>

impl<'t> Send for Badge<'t>

impl<'t> Sync for Badge<'t>

impl<'t> Unpin for Badge<'t>

impl<'t> UnwindSafe for Badge<'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.