[][src]Enum tmi_parser::TagValue

pub enum TagValue<'a> {
    Number(u32),
    Timestamp(u64),
    Boolean(bool),
    String(&'a str),
    None,
}

Possible values of message tags.

Variants

Number(u32)

Represents a parsed sequence of numbers of type u32.

Timestamp(u64)

Represents a parsed sequence of numbers of type u64.

Boolean(bool)

Boolean values represents literal "1" (true) or "0" (false).

Note that a single digit number "1" or "0" may be represented as a Boolean value instead of a Number value. Type conversion should therefore be done by the user code.

String(&'a str)

Strings represent an unparsed string literal.

None

None represents literal empty string "".

Implementations

impl<'a> TagValue<'a>[src]

pub fn new(val: &'a str) -> TagValue<'a>[src]

Returns a TagValue variant based on the given &str.

Trait Implementations

impl<'a> Debug for TagValue<'a>[src]

impl<'a> PartialEq<TagValue<'a>> for TagValue<'a>[src]

impl<'a> StructuralPartialEq for TagValue<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for TagValue<'a>[src]

impl<'a> Send for TagValue<'a>[src]

impl<'a> Sync for TagValue<'a>[src]

impl<'a> Unpin for TagValue<'a>[src]

impl<'a> UnwindSafe for TagValue<'a>[src]

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