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]
impl<'a> PartialEq for HeaderProp<'a>
fn eq(&self, other: &HeaderProp<'a>) -> bool
[src]
fn eq(&self, other: &HeaderProp<'a>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &HeaderProp<'a>) -> bool
[src]
fn ne(&self, other: &HeaderProp<'a>) -> bool
This method tests for !=
.
impl<'a> Debug for HeaderProp<'a>
[src]
impl<'a> Debug for HeaderProp<'a>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<'a> Clone for HeaderProp<'a>
[src]
impl<'a> Clone for HeaderProp<'a>
fn clone(&self) -> HeaderProp<'a>
[src]
fn clone(&self) -> HeaderProp<'a>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<'a> Serialize for HeaderProp<'a>
[src]
impl<'a> Serialize for HeaderProp<'a>
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> Send for HeaderProp<'a>
impl<'a> Sync for HeaderProp<'a>
impl<'a> Sync for HeaderProp<'a>