Enum emacs_multibyte::EncodedChar
source · pub enum EncodedChar {
One(Char),
Two([u8; 2]),
Three([u8; 3]),
Four([u8; 4]),
Five([u8; 5]),
Raw([u8; 2]),
}
Variants§
Implementations§
source§impl EncodedChar
impl EncodedChar
pub const fn from_uniform(x: SingleChar) -> Self
pub const fn into_uniform(self) -> SingleChar
pub fn try_parse(x: &[u8]) -> Result<(Self, &[u8]), DecodeError>
pub const fn byte_len(&self) -> usize
pub fn try_write<'a>( &self, x: &'a mut [MaybeUninit<u8>], ) -> Result<&'a mut [MaybeUninit<u8>], EncodeError>
Trait Implementations§
source§impl Arbitrary for EncodedChar
impl Arbitrary for EncodedChar
§type Parameters = ()
type Parameters = ()
The type of parameters that
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.§type Strategy = BoxedStrategy<EncodedChar>
type Strategy = BoxedStrategy<EncodedChar>
The type of
Strategy
used to generate values of type Self
.source§fn arbitrary_with(_args: ()) -> Self::Strategy
fn arbitrary_with(_args: ()) -> Self::Strategy
source§impl Clone for EncodedChar
impl Clone for EncodedChar
source§fn clone(&self) -> EncodedChar
fn clone(&self) -> EncodedChar
Returns a copy 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 EncodedChar
impl Debug for EncodedChar
source§impl Hash for EncodedChar
impl Hash for EncodedChar
source§impl Ord for EncodedChar
impl Ord for EncodedChar
source§fn cmp(&self, other: &EncodedChar) -> Ordering
fn cmp(&self, other: &EncodedChar) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for EncodedChar
impl PartialEq for EncodedChar
source§impl PartialOrd for EncodedChar
impl PartialOrd for EncodedChar
impl Copy for EncodedChar
impl Eq for EncodedChar
impl StructuralPartialEq for EncodedChar
Auto Trait Implementations§
impl Freeze for EncodedChar
impl RefUnwindSafe for EncodedChar
impl Send for EncodedChar
impl Sync for EncodedChar
impl Unpin for EncodedChar
impl UnwindSafe for EncodedChar
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)