[][src]Enum boxcars::HeaderProp

pub enum HeaderProp<'a> {
    Array(Vec<Vec<(&'a str, HeaderProp<'a>)>>),
    Bool(bool),
    Byte,
    Float(f32),
    Int(i32),
    Name(Cow<'a, str>),
    QWord(u64),
    Str(Cow<'a, str>),
}

All the interesting data are stored as properties in the header, properties such as:

  • When and who scored a goal
  • Player stats (goals, assists, score, etc).
  • Date and level played on

A property can be a number, string, or a more complex object such as an array containing additional properties.

Variants

Array(Vec<Vec<(&'a str, HeaderProp<'a>)>>)Bool(bool)ByteFloat(f32)Int(i32)Name(Cow<'a, str>)QWord(u64)Str(Cow<'a, str>)

Trait Implementations

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

impl<'a> Clone for HeaderProp<'a>[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

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

impl<'a> Serialize for HeaderProp<'a>[src]

By default serde will generate a serialization method that writes out the enum as well as the enum value. Since header values are self describing in JSON, we do not need to serialize the enum type. This is slightly lossy as in the serialized format it will be ambiguous if a value is a Name or Str, as well as Byte, Float, Int, or QWord.

Auto Trait Implementations

impl<'a> Send for HeaderProp<'a>

impl<'a> Sync for HeaderProp<'a>

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> From for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

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

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

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