pub struct IncompleteUtf8 {
pub buffer: [u8; 4],
pub buffer_len: u8,
}Fields§
§buffer: [u8; 4]§buffer_len: u8Implementations§
Source§impl IncompleteUtf8
impl IncompleteUtf8
Sourcepub fn try_to_complete_codepoint<'input>(
&mut self,
input: &'input [u8],
) -> Option<(Result<&str, &[u8]>, &'input [u8])>
pub fn try_to_complete_codepoint<'input>( &mut self, input: &'input [u8], ) -> Option<(Result<&str, &[u8]>, &'input [u8])>
Attempts to complete the codepoint given the bytes from input.
Returns None if more input is required to complete the codepoint. In this case, no
input is consumed.
Otherwise, returns either the decoded &str or malformed &[u8] and the remaining input.
pub fn try_complete<A, F>( &mut self, input: Tendril<Bytes, A>, push_utf8: F, ) -> Result<Tendril<Bytes, A>, ()>
Trait Implementations§
Source§impl Clone for IncompleteUtf8
impl Clone for IncompleteUtf8
Source§fn clone(&self) -> IncompleteUtf8
fn clone(&self) -> IncompleteUtf8
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 IncompleteUtf8
impl Debug for IncompleteUtf8
impl Copy for IncompleteUtf8
Auto Trait Implementations§
impl Freeze for IncompleteUtf8
impl RefUnwindSafe for IncompleteUtf8
impl Send for IncompleteUtf8
impl Sync for IncompleteUtf8
impl Unpin for IncompleteUtf8
impl UnsafeUnpin for IncompleteUtf8
impl UnwindSafe for IncompleteUtf8
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