[−][src]Struct conjoiner_engine::Cobs
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
Methods
impl<B> Cobs<B> where
B: SerFlavor + IndexMut<usize, Output = u8>,
[src]
B: SerFlavor + IndexMut<usize, Output = u8>,
pub fn try_new(bee: B) -> Result<Cobs<B>, Error>
[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(self) -> Result<<Cobs<B> as SerFlavor>::Output, ()>
[src]
fn try_extend(&mut self, data: &[u8]) -> Result<(), ()>
[src]
Auto Trait Implementations
impl<B> Send for Cobs<B> where
B: Send,
B: Send,
impl<B> Sync for Cobs<B> where
B: Sync,
B: Sync,
impl<B> Unpin for Cobs<B> where
B: Unpin,
B: Unpin,
impl<B> UnwindSafe for Cobs<B> where
B: UnwindSafe,
B: UnwindSafe,
impl<B> RefUnwindSafe for Cobs<B> where
B: RefUnwindSafe,
B: RefUnwindSafe,
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self