[][src]Trait utf::UtfExt

pub trait UtfExt: UtfExtSealed {
    type UtfSlice: ?Sized;
    pub fn try_encode_utf8(self, bs: &mut [u8]) -> Option<&mut Self::UtfSlice>;
}

Associated Types

Loading content...

Required methods

pub fn try_encode_utf8(self, bs: &mut [u8]) -> Option<&mut Self::UtfSlice>[src]

Encode the character into the given buffer; return None if the buffer is too short.

Loading content...

Implementors

impl UtfExt for char[src]

type UtfSlice = str

impl UtfExt for u32[src]

type UtfSlice = [u8]

Loading content...