pub trait UtfExt: UtfExtSealed {
type UtfSlice: ?Sized;
// Required method
fn try_encode_utf8(self, bs: &mut [u8]) -> Option<&mut Self::UtfSlice>;
}
Required Associated Types§
Required Methods§
Sourcefn try_encode_utf8(self, bs: &mut [u8]) -> Option<&mut Self::UtfSlice>
fn try_encode_utf8(self, bs: &mut [u8]) -> Option<&mut Self::UtfSlice>
Encode the character into the given buffer; return None
if the buffer is too short.