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.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".