Enum boxcars::HeaderProp
[−]
[src]
pub enum HeaderProp<'a> { Array(Vec<Vec<(&'a str, HeaderProp<'a>)>>), Bool(bool), Byte, Float(f32), Int(i32), Name(Cow<'a, str>), QWord(i64), 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)
Byte
Float(f32)
Int(i32)
Name(Cow<'a, str>)
QWord(i64)
Str(Cow<'a, str>)
Trait Implementations
impl<'a> PartialEq for HeaderProp<'a>
[src]
fn eq(&self, __arg_0: &HeaderProp<'a>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &HeaderProp<'a>) -> bool
[src]
This method tests for !=
.
impl<'a> Debug for HeaderProp<'a>
[src]
impl<'a> Clone for HeaderProp<'a>
[src]
fn clone(&self) -> HeaderProp<'a>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
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
.