pub struct Encoder { /* private fields */ }Expand description
Encoder for encoding FIT file.
Implementations§
Source§impl Encoder
impl Encoder
Sourcepub const fn new() -> Encoder
pub const fn new() -> Encoder
Create new Encoder for encoding FIT file.
For more options, use Encoder::builder() to build the Encoder.
Sourcepub fn stream<'a, W>(&'a mut self, writer: W) -> Stream<'a, W>
pub fn stream<'a, W>(&'a mut self, writer: W) -> Stream<'a, W>
Creates a Stream from a mutably borrowed Encoder for streaming encoding of the given writer.
Sourcepub fn encode<W>(
&mut self,
writer: W,
fit: &mut FIT,
) -> Result<(), Error<W::Error>>
pub fn encode<W>( &mut self, writer: W, fit: &mut FIT, ) -> Result<(), Error<W::Error>>
Encode the given fit to the writer.
Sourcepub fn release_heap_memory(&mut self)
pub fn release_heap_memory(&mut self)
Releases heap memory used by the Encoder back to the allocator, so it can be reused
by subsequent allocations in memory-constrained environments such as embedded systems
when a statically allocated Encoder is no longer in use.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Encoder
impl RefUnwindSafe for Encoder
impl Send for Encoder
impl Sync for Encoder
impl Unpin for Encoder
impl UnsafeUnpin for Encoder
impl UnwindSafe for Encoder
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