pub(crate) struct Incomplete {
pub(crate) buffer: [u8; 4],
pub(crate) buffer_len: u8,
}Fields§
§buffer: [u8; 4]§buffer_len: u8Implementations§
Source§impl Incomplete
impl Incomplete
pub(crate) fn new(bytes: &[u8]) -> Self
Sourcepub(crate) fn try_complete<'input>(
&mut self,
input: &'input [u8],
) -> Option<Completed<'_, 'input>>
pub(crate) fn try_complete<'input>( &mut self, input: &'input [u8], ) -> Option<Completed<'_, 'input>>
None: still incomplete, calltry_completeagain with more input. If no more input is available, this is invalid byte sequence.Some(completed): We’re done with thisIncomplete, with either a valid chunk on invalid byte sequence incompleted.result. To keep decoding, passcompleted.remaining_inputtodecode().
fn take_buffer(&mut self) -> &[u8] ⓘ
Trait Implementations§
Source§impl Clone for Incomplete
impl Clone for Incomplete
Source§fn clone(&self) -> Incomplete
fn clone(&self) -> Incomplete
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Incomplete
impl Debug for Incomplete
impl Copy for Incomplete
Auto Trait Implementations§
impl Freeze for Incomplete
impl RefUnwindSafe for Incomplete
impl Send for Incomplete
impl Sync for Incomplete
impl Unpin for Incomplete
impl UnwindSafe for Incomplete
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