#[repr(u8)]pub enum Ascii {
Show 128 variants
B00 = 0,
B01 = 1,
B02 = 2,
B03 = 3,
B04 = 4,
B05 = 5,
B06 = 6,
B07 = 7,
B08 = 8,
B09 = 9,
B0a = 10,
B0b = 11,
B0c = 12,
B0d = 13,
B0e = 14,
B0f = 15,
B10 = 16,
B11 = 17,
B12 = 18,
B13 = 19,
B14 = 20,
B15 = 21,
B16 = 22,
B17 = 23,
B18 = 24,
B19 = 25,
B1a = 26,
B1b = 27,
B1c = 28,
B1d = 29,
B1e = 30,
B1f = 31,
B20 = 32,
B21 = 33,
B22 = 34,
B23 = 35,
B24 = 36,
B25 = 37,
B26 = 38,
B27 = 39,
B28 = 40,
B29 = 41,
B2a = 42,
B2b = 43,
B2c = 44,
B2d = 45,
B2e = 46,
B2f = 47,
B30 = 48,
B31 = 49,
B32 = 50,
B33 = 51,
B34 = 52,
B35 = 53,
B36 = 54,
B37 = 55,
B38 = 56,
B39 = 57,
B3a = 58,
B3b = 59,
B3c = 60,
B3d = 61,
B3e = 62,
B3f = 63,
B40 = 64,
B41 = 65,
B42 = 66,
B43 = 67,
B44 = 68,
B45 = 69,
B46 = 70,
B47 = 71,
B48 = 72,
B49 = 73,
B4a = 74,
B4b = 75,
B4c = 76,
B4d = 77,
B4e = 78,
B4f = 79,
B50 = 80,
B51 = 81,
B52 = 82,
B53 = 83,
B54 = 84,
B55 = 85,
B56 = 86,
B57 = 87,
B58 = 88,
B59 = 89,
B5a = 90,
B5b = 91,
B5c = 92,
B5d = 93,
B5e = 94,
B5f = 95,
B60 = 96,
B61 = 97,
B62 = 98,
B63 = 99,
B64 = 100,
B65 = 101,
B66 = 102,
B67 = 103,
B68 = 104,
B69 = 105,
B6a = 106,
B6b = 107,
B6c = 108,
B6d = 109,
B6e = 110,
B6f = 111,
B70 = 112,
B71 = 113,
B72 = 114,
B73 = 115,
B74 = 116,
B75 = 117,
B76 = 118,
B77 = 119,
B78 = 120,
B79 = 121,
B7a = 122,
B7b = 123,
B7c = 124,
B7d = 125,
B7e = 126,
B7f = 127,
}Expand description
A byte in the ASCII range (single-byte UTF-8 sequence).
Variants§
B00 = 0
B01 = 1
B02 = 2
B03 = 3
B04 = 4
B05 = 5
B06 = 6
B07 = 7
B08 = 8
B09 = 9
B0a = 10
B0b = 11
B0c = 12
B0d = 13
B0e = 14
B0f = 15
B10 = 16
B11 = 17
B12 = 18
B13 = 19
B14 = 20
B15 = 21
B16 = 22
B17 = 23
B18 = 24
B19 = 25
B1a = 26
B1b = 27
B1c = 28
B1d = 29
B1e = 30
B1f = 31
B20 = 32
B21 = 33
B22 = 34
B23 = 35
B24 = 36
B25 = 37
B26 = 38
B27 = 39
B28 = 40
B29 = 41
B2a = 42
B2b = 43
B2c = 44
B2d = 45
B2e = 46
B2f = 47
B30 = 48
B31 = 49
B32 = 50
B33 = 51
B34 = 52
B35 = 53
B36 = 54
B37 = 55
B38 = 56
B39 = 57
B3a = 58
B3b = 59
B3c = 60
B3d = 61
B3e = 62
B3f = 63
B40 = 64
B41 = 65
B42 = 66
B43 = 67
B44 = 68
B45 = 69
B46 = 70
B47 = 71
B48 = 72
B49 = 73
B4a = 74
B4b = 75
B4c = 76
B4d = 77
B4e = 78
B4f = 79
B50 = 80
B51 = 81
B52 = 82
B53 = 83
B54 = 84
B55 = 85
B56 = 86
B57 = 87
B58 = 88
B59 = 89
B5a = 90
B5b = 91
B5c = 92
B5d = 93
B5e = 94
B5f = 95
B60 = 96
B61 = 97
B62 = 98
B63 = 99
B64 = 100
B65 = 101
B66 = 102
B67 = 103
B68 = 104
B69 = 105
B6a = 106
B6b = 107
B6c = 108
B6d = 109
B6e = 110
B6f = 111
B70 = 112
B71 = 113
B72 = 114
B73 = 115
B74 = 116
B75 = 117
B76 = 118
B77 = 119
B78 = 120
B79 = 121
B7a = 122
B7b = 123
B7c = 124
B7d = 125
B7e = 126
B7f = 127
Implementations§
Source§impl Ascii
impl Ascii
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(ascii: u8) -> Self
pub const unsafe fn new_unchecked(ascii: 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 ASCII and Err otherwise.
Trait Implementations§
impl Copy for Ascii
impl Eq for Ascii
Source§impl Ord for Ascii
impl Ord for Ascii
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 PartialOrd for Ascii
impl PartialOrd for Ascii
impl StructuralPartialEq for Ascii
Source§impl TryFrom<u8> for Ascii
impl TryFrom<u8> for Ascii
Source§type Error = Utf8ByteError
type Error = Utf8ByteError
The type returned in the event of a conversion error.
impl Utf8ByteSequence for Ascii
Auto Trait Implementations§
impl Freeze for Ascii
impl RefUnwindSafe for Ascii
impl Send for Ascii
impl Sync for Ascii
impl Unpin for Ascii
impl UnsafeUnpin for Ascii
impl UnwindSafe for Ascii
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