Enum fitparser::Value

source ·
pub enum Value {
Show 19 variants Timestamp(DateTime<Local>), Byte(u8), Enum(u8), SInt8(i8), UInt8(u8), SInt16(i16), UInt16(u16), SInt32(i32), UInt32(u32), String(String), Float32(f32), Float64(f64), UInt8z(u8), UInt16z(u16), UInt32z(u32), SInt64(i64), UInt64(u64), UInt64z(u64), Array(Vec<Self>),
}
Expand description

Contains arbitrary data in the defined format.

Variants§

§

Timestamp(DateTime<Local>)

Timestamp field converted to the local timezone

§

Byte(u8)

Unsigned 8bit integer data

§

Enum(u8)

Unsigned 8bit integer that gets mapped to a FieldType enum

§

SInt8(i8)

Signed 8bit integer data

§

UInt8(u8)

Unsigned 8bit integer data

§

SInt16(i16)

Signed 16bit integer data

§

UInt16(u16)

Unsigned 16bit integer data

§

SInt32(i32)

Signed 32bit integer data

§

UInt32(u32)

Unsigned 32bit integer data

§

String(String)

UTF-8 format string data

§

Float32(f32)

32bit floating point data

§

Float64(f64)

64bit floating point data

§

UInt8z(u8)

Unsigned 8bit integer data where the invalid value is 0x0 instead of 0xFF

§

UInt16z(u16)

Unsigned 16bit integer data where the invalid value is 0x0 instead of 0xFFFF

§

UInt32z(u32)

Unsigned 16bit integer data where the invalid value is 0x0 instead of 0xFFFFFFFF

§

SInt64(i64)

Signed 64bit integer data

§

UInt64(u64)

Unsigned 64bit integer data

§

UInt64z(u64)

Unsigned 64bit integer data where the invalid value is 0x0 instead of 0xFFFFFFFFFFFFFFFF

§

Array(Vec<Self>)

Array of Values, while this allows nested arrays and mixed types this is not possible in a properly formatted FIT file

Trait Implementations§

source§

impl Clone for Value

source§

fn clone(&self) -> Value

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Value

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for Value

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<TimestampField> for Value

source§

fn from(timestamp: TimestampField) -> Value

Converts to this type from the input type.
source§

impl PartialEq for Value

source§

fn eq(&self, other: &Value) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for Value

source§

fn partial_cmp(&self, other: &Value) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Serialize for Value

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl TryInto<f64> for Value

§

type Error = Box<ErrorKind>

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<f64>

Performs the conversion.
source§

impl TryInto<i64> for &Value

§

type Error = Box<ErrorKind>

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<i64>

Performs the conversion.
source§

impl TryInto<i64> for Value

§

type Error = Box<ErrorKind>

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<i64>

Performs the conversion.
source§

impl StructuralPartialEq for Value

Auto Trait Implementations§

§

impl Freeze for Value

§

impl RefUnwindSafe for Value

§

impl Send for Value

§

impl Sync for Value

§

impl Unpin for Value

§

impl UnwindSafe for Value

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.