Struct postcard::flavors::Cobs [−][src]
The Cobs
flavor implements Consistent Overhead Byte Stuffing on
the serialized data. The output of this flavor includes the termination/sentinel
byte of 0x00
.
This protocol is useful when sending data over a serial interface without framing such as a UART
Implementations
impl<B> Cobs<B> where
B: SerFlavor + IndexMut<usize, Output = u8>,
[src]
B: SerFlavor + IndexMut<usize, Output = u8>,
pub fn try_new(mut bee: B) -> Result<Self>
[src]
Create a new Cobs modifier Flavor. If there is insufficient space to push the leading header byte, the method will return an Error
Trait Implementations
impl<'a, B> SerFlavor for Cobs<B> where
B: SerFlavor + IndexMut<usize, Output = u8>,
[src]
B: SerFlavor + IndexMut<usize, Output = u8>,
type Output = <B as SerFlavor>::Output
The Output
type is what this flavor "resolves" to when the serialization is complete.
For storage flavors, this is typically a concrete type. For modification flavors, this is
typically a generic parameter for the storage flavor they are wrapped around. Read more
fn try_push(&mut self, data: u8) -> Result<(), ()>
[src]
fn release(mut self: Self) -> Result<Self::Output, ()>
[src]
fn try_extend(&mut self, data: &[u8]) -> Result<(), ()>
[src]
fn try_push_varint_usize(&mut self, data: &VarintUsize) -> Result<(), ()>
[src]
Auto Trait Implementations
impl<B> RefUnwindSafe for Cobs<B> where
B: RefUnwindSafe,
[src]
B: RefUnwindSafe,
impl<B> Send for Cobs<B> where
B: Send,
[src]
B: Send,
impl<B> Sync for Cobs<B> where
B: Sync,
[src]
B: Sync,
impl<B> Unpin for Cobs<B> where
B: Unpin,
[src]
B: Unpin,
impl<B> UnwindSafe for Cobs<B> where
B: UnwindSafe,
[src]
B: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,