pub struct FitStreamProcessor { /* private fields */ }
Expand description
Deserialize and decode a stream of bytes
Implementations§
Source§impl FitStreamProcessor
impl FitStreamProcessor
Sourcepub fn add_option(&mut self, opt: DecodeOption)
pub fn add_option(&mut self, opt: DecodeOption)
Add a decoding option to the processor
Sourcepub fn remove_option(&mut self, opt: DecodeOption)
pub fn remove_option(&mut self, opt: DecodeOption)
Add a decoding option to the processor
Sourcepub fn options(&self) -> &HashSet<DecodeOption>
pub fn options(&self) -> &HashSet<DecodeOption>
Fetch decoding options from the deserializer
Sourcepub fn reset(&mut self)
pub fn reset(&mut self)
Reset the decoder state and definition messages in use, this should be called at the end of each FIT file to ensure the accumlator fields in the decoder will produce the right values per file.
Sourcepub fn deserialize_next<'de>(
&mut self,
input: &'de [u8],
) -> Result<(&'de [u8], FitObject)>
pub fn deserialize_next<'de>( &mut self, input: &'de [u8], ) -> Result<(&'de [u8], FitObject)>
Deserialize a FitObject from the byte stream.
Sourcepub fn decode_message(&mut self, msg: FitDataMessage) -> Result<FitDataRecord>
pub fn decode_message(&mut self, msg: FitDataMessage) -> Result<FitDataRecord>
Decode a FIT data message into a FIT data record using the defined FIT profile.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FitStreamProcessor
impl RefUnwindSafe for FitStreamProcessor
impl Send for FitStreamProcessor
impl Sync for FitStreamProcessor
impl Unpin for FitStreamProcessor
impl UnwindSafe for FitStreamProcessor
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