pub struct CobsEncoder<'a> {
dest: &'a mut [u8],
dest_idx: usize,
state: EncoderState,
might_be_done: bool,
}Expand description
The CobsEncoder type is used to encode a stream of bytes to a
given mutable output slice. This is often useful when heap data
structures are not available, or when not all message bytes are
received at a single point in time.
Fields§
§dest: &'a mut [u8]§dest_idx: usize§state: EncoderState§might_be_done: boolImplementations§
Source§impl<'a> CobsEncoder<'a>
impl<'a> CobsEncoder<'a>
Sourcepub fn new(out_buf: &'a mut [u8]) -> CobsEncoder<'a>
pub fn new(out_buf: &'a mut [u8]) -> CobsEncoder<'a>
Create a new streaming Cobs Encoder
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for CobsEncoder<'a>
impl<'a> RefUnwindSafe for CobsEncoder<'a>
impl<'a> Send for CobsEncoder<'a>
impl<'a> Sync for CobsEncoder<'a>
impl<'a> Unpin for CobsEncoder<'a>
impl<'a> !UnwindSafe for CobsEncoder<'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