#[repr(u8)]pub enum UnconstrainedContinuation {
Show 64 variants
B80 = 128,
B81 = 129,
B82 = 130,
B83 = 131,
B84 = 132,
B85 = 133,
B86 = 134,
B87 = 135,
B88 = 136,
B89 = 137,
B8a = 138,
B8b = 139,
B8c = 140,
B8d = 141,
B8e = 142,
B8f = 143,
B90 = 144,
B91 = 145,
B92 = 146,
B93 = 147,
B94 = 148,
B95 = 149,
B96 = 150,
B97 = 151,
B98 = 152,
B99 = 153,
B9a = 154,
B9b = 155,
B9c = 156,
B9d = 157,
B9e = 158,
B9f = 159,
Ba0 = 160,
Ba1 = 161,
Ba2 = 162,
Ba3 = 163,
Ba4 = 164,
Ba5 = 165,
Ba6 = 166,
Ba7 = 167,
Ba8 = 168,
Ba9 = 169,
Baa = 170,
Bab = 171,
Bac = 172,
Bad = 173,
Bae = 174,
Baf = 175,
Bb0 = 176,
Bb1 = 177,
Bb2 = 178,
Bb3 = 179,
Bb4 = 180,
Bb5 = 181,
Bb6 = 182,
Bb7 = 183,
Bb8 = 184,
Bb9 = 185,
Bba = 186,
Bbb = 187,
Bbc = 188,
Bbd = 189,
Bbe = 190,
Bbf = 191,
}Expand description
An unconstrained UTF-8 continuation byte (0x80 to 0xBF, inclusive)
Any continuation byte is valid as this type, but this type is not sufficiently constrained to guarantee validity as the second byte of a three-byte or four-byte sequence whose lead byte is 0xE0, 0xED, 0xF0, or 0xF4.
Variants§
B80 = 128
B81 = 129
B82 = 130
B83 = 131
B84 = 132
B85 = 133
B86 = 134
B87 = 135
B88 = 136
B89 = 137
B8a = 138
B8b = 139
B8c = 140
B8d = 141
B8e = 142
B8f = 143
B90 = 144
B91 = 145
B92 = 146
B93 = 147
B94 = 148
B95 = 149
B96 = 150
B97 = 151
B98 = 152
B99 = 153
B9a = 154
B9b = 155
B9c = 156
B9d = 157
B9e = 158
B9f = 159
Ba0 = 160
Ba1 = 161
Ba2 = 162
Ba3 = 163
Ba4 = 164
Ba5 = 165
Ba6 = 166
Ba7 = 167
Ba8 = 168
Ba9 = 169
Baa = 170
Bab = 171
Bac = 172
Bad = 173
Bae = 174
Baf = 175
Bb0 = 176
Bb1 = 177
Bb2 = 178
Bb3 = 179
Bb4 = 180
Bb5 = 181
Bb6 = 182
Bb7 = 183
Bb8 = 184
Bb9 = 185
Bba = 186
Bbb = 187
Bbc = 188
Bbd = 189
Bbe = 190
Bbf = 191
Implementations§
Source§impl UnconstrainedContinuation
impl UnconstrainedContinuation
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(continuation: u8) -> Self
pub const unsafe fn new_unchecked(continuation: 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 0x80 to 0xBF, inclusive, and Err otherwise.
Sourcepub const fn to_non_ascii(self) -> NonAscii
pub const fn to_non_ascii(self) -> NonAscii
Convert to NonAscii
Sourcepub const fn low_six(self) -> u8
pub const fn low_six(self) -> u8
Obtain the least-significant six bits (i.e. the non-tag bits).
§Safety-usable invariant
Only the least-significant six bits can have non-zero values.
Sourcepub const fn low_six_u32(self) -> u32
pub const fn low_six_u32(self) -> u32
Obtain the least-significant six bits (i.e. the non-tag bits) as u32.
§Safety-usable invariant
Only the least-significant six bits can have non-zero values.