pub struct RawField<'a> { /* private fields */ }Expand description
A field of the FIT profile the crate does not model, by its number in its message, for
Writer::raw_message or, as an Extra, for
Writer::record_with. The encoder checks only that its bytes
fit its base type and are not “none”; their meaning is the caller’s.
use fit_encoder::{BaseType, RawField};
let breaths = RawField::number(108, 1850u16); // enhanced_respiration_rate, 18.5/min
let gear = RawField::enumeration(0, 43); // event: rear_gear_change
let zones = RawField::bytes(1, BaseType::UINT8, &[120, 140, 160, 175]);Implementations§
Source§impl<'a> RawField<'a>
impl<'a> RawField<'a>
Sourcepub fn number<T: Scalar>(num: u8, value: T) -> Self
pub fn number<T: Scalar>(num: u8, value: T) -> Self
Field num holding a number, of the base type T’s.
Sourcepub const fn enumeration(num: u8, value: u8) -> Self
pub const fn enumeration(num: u8, value: u8) -> Self
Field num holding an enum value.
Trait Implementations§
impl<'a> Copy for RawField<'a>
impl<'a> Eq for RawField<'a>
impl<'a> StructuralPartialEq for RawField<'a>
Auto Trait Implementations§
impl<'a> Forget for RawField<'a>
impl<'a> Freeze for RawField<'a>
impl<'a> Move for RawField<'a>
impl<'a> RefUnwindSafe for RawField<'a>
impl<'a> Send for RawField<'a>
impl<'a> Sync for RawField<'a>
impl<'a> Unpin for RawField<'a>
impl<'a> UnsafeUnpin for RawField<'a>
impl<'a> UnwindSafe for RawField<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more