Struct utf8::Incomplete[][src]

pub struct Incomplete {
    pub buffer: [u8; 4],
    pub buffer_len: u8,
}

Fields

buffer: [u8; 4]buffer_len: u8

Implementations

impl Incomplete[src]

pub fn empty() -> Self[src]

pub fn is_empty(&self) -> bool[src]

pub fn new(bytes: &[u8]) -> Self[src]

pub fn try_complete<'input>(
    &mut self,
    input: &'input [u8]
) -> Option<(Result<&str, &[u8]>, &'input [u8])>
[src]

  • None: still incomplete, call try_complete again with more input. If no more input is available, this is invalid byte sequence.
  • Some((result, remaining_input)): We’re done with this Incomplete. To keep decoding, pass remaining_input to decode().

Trait Implementations

impl Clone for Incomplete[src]

impl Copy for Incomplete[src]

impl Debug for Incomplete[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.