Struct slip_codec::SlipEncoder
source · pub struct SlipEncoder { /* private fields */ }
Expand description
SLIP encoder context
Implementations§
source§impl SlipEncoder
impl SlipEncoder
sourcepub fn encode(&mut self, buf: &[u8], sink: &mut dyn Write) -> Result<usize>
pub fn encode(&mut self, buf: &[u8], sink: &mut dyn Write) -> Result<usize>
Encodes the given buffer in a SLIP frame and forwards it to the sink.
Arguments
buf
- input data buffer for encodingsink
- output object implementing the std::io::Write trait
Returns the number of bytes written to the sink.
Trait Implementations§
source§impl Debug for SlipEncoder
impl Debug for SlipEncoder
Auto Trait Implementations§
impl RefUnwindSafe for SlipEncoder
impl Send for SlipEncoder
impl Sync for SlipEncoder
impl Unpin for SlipEncoder
impl UnwindSafe for SlipEncoder
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