#[repr(u8)]pub enum LeadForMultiByte {
Show 51 variants
Bc2 = 194,
Bc3 = 195,
Bc4 = 196,
Bc5 = 197,
Bc6 = 198,
Bc7 = 199,
Bc8 = 200,
Bc9 = 201,
Bca = 202,
Bcb = 203,
Bcc = 204,
Bcd = 205,
Bce = 206,
Bcf = 207,
Bd0 = 208,
Bd1 = 209,
Bd2 = 210,
Bd3 = 211,
Bd4 = 212,
Bd5 = 213,
Bd6 = 214,
Bd7 = 215,
Bd8 = 216,
Bd9 = 217,
Bda = 218,
Bdb = 219,
Bdc = 220,
Bdd = 221,
Bde = 222,
Bdf = 223,
Be0 = 224,
Be1 = 225,
Be2 = 226,
Be3 = 227,
Be4 = 228,
Be5 = 229,
Be6 = 230,
Be7 = 231,
Be8 = 232,
Be9 = 233,
Bea = 234,
Beb = 235,
Bec = 236,
Bed = 237,
Bee = 238,
Bef = 239,
Bf0 = 240,
Bf1 = 241,
Bf2 = 242,
Bf3 = 243,
Bf4 = 244,
}Expand description
A lead byte for a multibyte sequence (two-byte, three-byte, or four-byte).
Variants§
Bc2 = 194
Bc3 = 195
Bc4 = 196
Bc5 = 197
Bc6 = 198
Bc7 = 199
Bc8 = 200
Bc9 = 201
Bca = 202
Bcb = 203
Bcc = 204
Bcd = 205
Bce = 206
Bcf = 207
Bd0 = 208
Bd1 = 209
Bd2 = 210
Bd3 = 211
Bd4 = 212
Bd5 = 213
Bd6 = 214
Bd7 = 215
Bd8 = 216
Bd9 = 217
Bda = 218
Bdb = 219
Bdc = 220
Bdd = 221
Bde = 222
Bdf = 223
Be0 = 224
Be1 = 225
Be2 = 226
Be3 = 227
Be4 = 228
Be5 = 229
Be6 = 230
Be7 = 231
Be8 = 232
Be9 = 233
Bea = 234
Beb = 235
Bec = 236
Bed = 237
Bee = 238
Bef = 239
Bf0 = 240
Bf1 = 241
Bf2 = 242
Bf3 = 243
Bf4 = 244
Implementations§
Source§impl LeadForMultiByte
impl LeadForMultiByte
Sourcepub const fn is(byte: u8) -> bool
pub const fn is(byte: u8) -> bool
Whether byte is in range for this type.
§Safety-usable invariant
Iff this method returns true, the safety invariant of new_unchecked()
is satisfied.
Sourcepub const unsafe fn new_unchecked(lead: u8) -> Self
pub const unsafe fn new_unchecked(lead: u8) -> Self
Sourcepub const fn try_new(byte: u8) -> Result<Self, Utf8ByteError>
pub const fn try_new(byte: u8) -> Result<Self, Utf8ByteError>
Fallible constructor
Ok if in the range 0xC2 to 0xF4, inclusive, and Err otherwise.
Sourcepub const fn to_non_ascii(self) -> NonAscii
pub const fn to_non_ascii(self) -> NonAscii
Convert to NonAscii
Trait Implementations§
Source§impl Clone for LeadForMultiByte
impl Clone for LeadForMultiByte
impl Copy for LeadForMultiByte
Source§impl Debug for LeadForMultiByte
impl Debug for LeadForMultiByte
impl Eq for LeadForMultiByte
Source§impl From<LeadForFourByte> for LeadForMultiByte
impl From<LeadForFourByte> for LeadForMultiByte
Source§fn from(lead: LeadForFourByte) -> Self
fn from(lead: LeadForFourByte) -> Self
Converts to this type from the input type.
Source§impl From<LeadForMultiByte> for u8
impl From<LeadForMultiByte> for u8
Source§fn from(lead: LeadForMultiByte) -> Self
fn from(lead: LeadForMultiByte) -> Self
Converts to this type from the input type.
Source§impl From<LeadForMultiByte> for NonAscii
impl From<LeadForMultiByte> for NonAscii
Source§fn from(lead: LeadForMultiByte) -> Self
fn from(lead: LeadForMultiByte) -> Self
Converts to this type from the input type.
Source§impl From<LeadForThreeByte> for LeadForMultiByte
impl From<LeadForThreeByte> for LeadForMultiByte
Source§fn from(lead: LeadForThreeByte) -> Self
fn from(lead: LeadForThreeByte) -> Self
Converts to this type from the input type.
Source§impl From<LeadForTwoByte> for LeadForMultiByte
impl From<LeadForTwoByte> for LeadForMultiByte
Source§fn from(lead: LeadForTwoByte) -> Self
fn from(lead: LeadForTwoByte) -> Self
Converts to this type from the input type.
Source§impl Hash for LeadForMultiByte
impl Hash for LeadForMultiByte
Source§impl Ord for LeadForMultiByte
impl Ord for LeadForMultiByte
1.21.0 (const: unstable) · 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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for LeadForMultiByte
impl PartialEq for LeadForMultiByte
Source§impl PartialOrd for LeadForMultiByte
impl PartialOrd for LeadForMultiByte
impl StructuralPartialEq for LeadForMultiByte
Source§impl TryFrom<LeadForMultiByte> for LeadForTwoByte
impl TryFrom<LeadForMultiByte> for LeadForTwoByte
Source§type Error = Utf8ByteError
type Error = Utf8ByteError
The type returned in the event of a conversion error.
Source§fn try_from(lead: LeadForMultiByte) -> Result<Self, Utf8ByteError>
fn try_from(lead: LeadForMultiByte) -> Result<Self, Utf8ByteError>
Performs the conversion.
Source§impl TryFrom<LeadForMultiByte> for LeadForThreeByte
impl TryFrom<LeadForMultiByte> for LeadForThreeByte
Source§type Error = Utf8ByteError
type Error = Utf8ByteError
The type returned in the event of a conversion error.
Source§fn try_from(lead: LeadForMultiByte) -> Result<Self, Utf8ByteError>
fn try_from(lead: LeadForMultiByte) -> Result<Self, Utf8ByteError>
Performs the conversion.
Source§impl TryFrom<LeadForMultiByte> for LeadForFourByte
impl TryFrom<LeadForMultiByte> for LeadForFourByte
Source§type Error = Utf8ByteError
type Error = Utf8ByteError
The type returned in the event of a conversion error.
Source§fn try_from(lead: LeadForMultiByte) -> Result<Self, Utf8ByteError>
fn try_from(lead: LeadForMultiByte) -> Result<Self, Utf8ByteError>
Performs the conversion.
Source§impl TryFrom<NonAscii> for LeadForMultiByte
impl TryFrom<NonAscii> for LeadForMultiByte
Source§type Error = Utf8ByteError
type Error = Utf8ByteError
The type returned in the event of a conversion error.
Source§impl TryFrom<u8> for LeadForMultiByte
impl TryFrom<u8> for LeadForMultiByte
Source§type Error = Utf8ByteError
type Error = Utf8ByteError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for LeadForMultiByte
impl RefUnwindSafe for LeadForMultiByte
impl Send for LeadForMultiByte
impl Sync for LeadForMultiByte
impl Unpin for LeadForMultiByte
impl UnsafeUnpin for LeadForMultiByte
impl UnwindSafe for LeadForMultiByte
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