pub struct Encoder { /* private fields */ }
Expand description
SLIP encoder context
Implementations§
Source§impl Encoder
impl Encoder
Sourcepub fn encode(
&mut self,
input: &[u8],
output: &mut [u8],
) -> Result<EncodeTotals>
pub fn encode( &mut self, input: &[u8], output: &mut [u8], ) -> Result<EncodeTotals>
Encode a buffer into a SLIP stream and returns the number of input bytes read and output bytes written.
Sourcepub fn finish(self, output: &mut [u8]) -> Result<EncodeTotals>
pub fn finish(self, output: &mut [u8]) -> Result<EncodeTotals>
Finish encoding the current packet and return the number of output bytes written.
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 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