Struct utf8::Incomplete
source · Fields
buffer: [u8; 4]
buffer_len: u8
Implementations
sourceimpl Incomplete
impl Incomplete
pub fn empty() -> Self
pub fn is_empty(&self) -> bool
pub fn new(bytes: &[u8]) -> Self
sourcepub fn try_complete<'input>(
&mut self,
input: &'input [u8]
) -> Option<(Result<&str, &[u8]>, &'input [u8])>
pub fn try_complete<'input>(
&mut self,
input: &'input [u8]
) -> Option<(Result<&str, &[u8]>, &'input [u8])>
None
: still incomplete, calltry_complete
again with more input. If no more input is available, this is invalid byte sequence.Some((result, remaining_input))
: We’re done with thisIncomplete
. To keep decoding, passremaining_input
todecode()
.
Trait Implementations
sourceimpl Clone for Incomplete
impl Clone for Incomplete
sourcefn clone(&self) -> Incomplete
fn clone(&self) -> Incomplete
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for Incomplete
impl Debug for Incomplete
impl Copy for Incomplete
Auto Trait Implementations
impl RefUnwindSafe for Incomplete
impl Send for Incomplete
impl Sync for Incomplete
impl Unpin for Incomplete
impl UnwindSafe for Incomplete
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more