ASCIIChar

Enum ASCIIChar 

Source
#[repr(u8)]
pub enum ASCIIChar {
Show 128 variants Null = 0, StartOfHeading = 1, StartOfText = 2, EndOfText = 3, EndOfTransmission = 4, Enquiry = 5, Acknowledge = 6, Bell = 7, Backspace = 8, CharacterTabulation = 9, LineFeed = 10, LineTabulation = 11, FormFeed = 12, CarriageReturn = 13, ShiftOut = 14, ShiftIn = 15, DataLinkEscape = 16, DeviceControlOne = 17, DeviceControlTwo = 18, DeviceControlThree = 19, DeviceControlFour = 20, NegativeAcknowledge = 21, SynchronousIdle = 22, EndOfTransmissionBlock = 23, Cancel = 24, EndOfMedium = 25, Substitute = 26, Escape = 27, InformationSeparatorFour = 28, InformationSeparatorThree = 29, InformationSeparatorTwo = 30, InformationSeparatorOne = 31, Space = 32, ExclamationMark = 33, QuotationMark = 34, NumberSign = 35, DollarSign = 36, PercentSign = 37, Ampersand = 38, Apostrophe = 39, LeftParenthesis = 40, RightParenthesis = 41, Asterisk = 42, PlusSign = 43, Comma = 44, HyphenMinus = 45, FullStop = 46, Solidus = 47, Digit0 = 48, Digit1 = 49, Digit2 = 50, Digit3 = 51, Digit4 = 52, Digit5 = 53, Digit6 = 54, Digit7 = 55, Digit8 = 56, Digit9 = 57, Colon = 58, Semicolon = 59, LessThanSign = 60, EqualsSign = 61, GreaterThanSign = 62, QuestionMark = 63, CommercialAt = 64, CapitalA = 65, CapitalB = 66, CapitalC = 67, CapitalD = 68, CapitalE = 69, CapitalF = 70, CapitalG = 71, CapitalH = 72, CapitalI = 73, CapitalJ = 74, CapitalK = 75, CapitalL = 76, CapitalM = 77, CapitalN = 78, CapitalO = 79, CapitalP = 80, CapitalQ = 81, CapitalR = 82, CapitalS = 83, CapitalT = 84, CapitalU = 85, CapitalV = 86, CapitalW = 87, CapitalX = 88, CapitalY = 89, CapitalZ = 90, LeftSquareBracket = 91, ReverseSolidus = 92, RightSquareBracket = 93, CircumflexAccent = 94, LowLine = 95, GraveAccent = 96, SmallA = 97, SmallB = 98, SmallC = 99, SmallD = 100, SmallE = 101, SmallF = 102, SmallG = 103, SmallH = 104, SmallI = 105, SmallJ = 106, SmallK = 107, SmallL = 108, SmallM = 109, SmallN = 110, SmallO = 111, SmallP = 112, SmallQ = 113, SmallR = 114, SmallS = 115, SmallT = 116, SmallU = 117, SmallV = 118, SmallW = 119, SmallX = 120, SmallY = 121, SmallZ = 122, LeftCurlyBracket = 123, VerticalLine = 124, RightCurlyBracket = 125, Tilde = 126, Delete = 127,
}
Expand description

An ASCII character. This is a subset of the Unicode character set.

See ascii for more information. And actually, most of this type is copied of the std::ascii::Char type.

Variants§

§

Null = 0

U+0000 (The default variant)

§

StartOfHeading = 1

U+0001

§

StartOfText = 2

U+0002

§

EndOfText = 3

U+0003

§

EndOfTransmission = 4

U+0004

§

Enquiry = 5

U+0005

§

Acknowledge = 6

U+0006

§

Bell = 7

U+0007

§

Backspace = 8

U+0008

§

CharacterTabulation = 9

U+0009

§

LineFeed = 10

U+000A

§

LineTabulation = 11

U+000B

§

FormFeed = 12

U+000C

§

CarriageReturn = 13

U+000D

§

ShiftOut = 14

U+000E

§

ShiftIn = 15

U+000F

§

DataLinkEscape = 16

U+0010

§

DeviceControlOne = 17

U+0011

§

DeviceControlTwo = 18

U+0012

§

DeviceControlThree = 19

U+0013

§

DeviceControlFour = 20

U+0014

§

NegativeAcknowledge = 21

U+0015

§

SynchronousIdle = 22

U+0016

§

EndOfTransmissionBlock = 23

U+0017

§

Cancel = 24

U+0018

§

EndOfMedium = 25

U+0019

§

Substitute = 26

U+001A

§

Escape = 27

U+001B

§

InformationSeparatorFour = 28

U+001C

§

InformationSeparatorThree = 29

U+001D

§

InformationSeparatorTwo = 30

U+001E

§

InformationSeparatorOne = 31

U+001F

§

Space = 32

U+0020

§

ExclamationMark = 33

U+0021

§

QuotationMark = 34

U+0022

§

NumberSign = 35

U+0023

§

DollarSign = 36

U+0024

§

PercentSign = 37

U+0025

§

Ampersand = 38

U+0026

§

Apostrophe = 39

U+0027

§

LeftParenthesis = 40

U+0028

§

RightParenthesis = 41

U+0029

§

Asterisk = 42

U+002A

§

PlusSign = 43

U+002B

§

Comma = 44

U+002C

§

HyphenMinus = 45

U+002D

§

FullStop = 46

U+002E

§

Solidus = 47

U+002F

§

Digit0 = 48

U+0030

§

Digit1 = 49

U+0031

§

Digit2 = 50

U+0032

§

Digit3 = 51

U+0033

§

Digit4 = 52

U+0034

§

Digit5 = 53

U+0035

§

Digit6 = 54

U+0036

§

Digit7 = 55

U+0037

§

Digit8 = 56

U+0038

§

Digit9 = 57

U+0039

§

Colon = 58

U+003A

§

Semicolon = 59

U+003B

§

LessThanSign = 60

U+003C

§

EqualsSign = 61

U+003D

§

GreaterThanSign = 62

U+003E

§

QuestionMark = 63

U+003F

§

CommercialAt = 64

U+0040

§

CapitalA = 65

U+0041

§

CapitalB = 66

U+0042

§

CapitalC = 67

U+0043

§

CapitalD = 68

U+0044

§

CapitalE = 69

U+0045

§

CapitalF = 70

U+0046

§

CapitalG = 71

U+0047

§

CapitalH = 72

U+0048

§

CapitalI = 73

U+0049

§

CapitalJ = 74

U+004A

§

CapitalK = 75

U+004B

§

CapitalL = 76

U+004C

§

CapitalM = 77

U+004D

§

CapitalN = 78

U+004E

§

CapitalO = 79

U+004F

§

CapitalP = 80

U+0050

§

CapitalQ = 81

U+0051

§

CapitalR = 82

U+0052

§

CapitalS = 83

U+0053

§

CapitalT = 84

U+0054

§

CapitalU = 85

U+0055

§

CapitalV = 86

U+0056

§

CapitalW = 87

U+0057

§

CapitalX = 88

U+0058

§

CapitalY = 89

U+0059

§

CapitalZ = 90

U+005A

§

LeftSquareBracket = 91

U+005B

§

ReverseSolidus = 92

U+005C

§

RightSquareBracket = 93

U+005D

§

CircumflexAccent = 94

U+005E

§

LowLine = 95

U+005F

§

GraveAccent = 96

U+0060

§

SmallA = 97

U+0061

§

SmallB = 98

U+0062

§

SmallC = 99

U+0063

§

SmallD = 100

U+0064

§

SmallE = 101

U+0065

§

SmallF = 102

U+0066

§

SmallG = 103

U+0067

§

SmallH = 104

U+0068

§

SmallI = 105

U+0069

§

SmallJ = 106

U+006A

§

SmallK = 107

U+006B

§

SmallL = 108

U+006C

§

SmallM = 109

U+006D

§

SmallN = 110

U+006E

§

SmallO = 111

U+006F

§

SmallP = 112

U+0070

§

SmallQ = 113

U+0071

§

SmallR = 114

U+0072

§

SmallS = 115

U+0073

§

SmallT = 116

U+0074

§

SmallU = 117

U+0075

§

SmallV = 118

U+0076

§

SmallW = 119

U+0077

§

SmallX = 120

U+0078

§

SmallY = 121

U+0079

§

SmallZ = 122

U+007A

§

LeftCurlyBracket = 123

U+007B

§

VerticalLine = 124

U+007C

§

RightCurlyBracket = 125

U+007D

§

Tilde = 126

U+007E

§

Delete = 127

U+007F

Implementations§

Source§

impl Char

Source

pub const fn to_u8(self) -> u8

Converts a Char to a u8.

Source

pub const fn as_str(&self) -> &str

Converts a Char to a string slice.

Source

pub const fn slice_as_str(slice: &[Self]) -> &str

Converts a slice of Char to a string slice.

Source

pub fn slice_as_mut_str(slice: &mut [Self]) -> &mut str

Converts a mutable slice of Char to a mutable string slice.

Trait Implementations§

Source§

impl Add<u8> for Char

Source§

type Output = Char

The resulting type after applying the + operator.
Source§

fn add(self, rhs: u8) -> Char

Performs the + operation. Read more
Source§

impl AddAssign<u8> for Char

Source§

fn add_assign(&mut self, rhs: u8)

Performs the += operation. Read more
Source§

impl Clone for Char

Source§

fn clone(&self) -> Char

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Char

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Dimension for ASCIIChar

Source§

const DIMENSION: usize = 0usize

Dimension. Read more
Source§

const SPACE: bool = false

Need space between every two items?
Source§

fn get_default_separator() -> &'static str

Get the default separator according to the dimension and space.
Source§

impl Display for Char

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Div<u8> for Char

Source§

type Output = Char

The resulting type after applying the / operator.
Source§

fn div(self, rhs: u8) -> Char

Performs the / operation. Read more
Source§

impl DivAssign<u8> for Char

Source§

fn div_assign(&mut self, rhs: u8)

Performs the /= operation. Read more
Source§

impl From<Char> for char

Source§

fn from(chr: Char) -> char

Converts to this type from the input type.
Source§

impl From<Char> for u128

Source§

fn from(chr: Char) -> u128

Converts to this type from the input type.
Source§

impl From<Char> for u16

Source§

fn from(chr: Char) -> u16

Converts to this type from the input type.
Source§

impl From<Char> for u32

Source§

fn from(chr: Char) -> u32

Converts to this type from the input type.
Source§

impl From<Char> for u64

Source§

fn from(chr: Char) -> u64

Converts to this type from the input type.
Source§

impl From<Char> for u8

Source§

fn from(chr: Char) -> u8

Converts to this type from the input type.
Source§

impl FromStr for Char

Source§

type Err = Error

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl Hash for Char

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Mul<u8> for Char

Source§

type Output = Char

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: u8) -> Char

Performs the * operation. Read more
Source§

impl MulAssign<u8> for Char

Source§

fn mul_assign(&mut self, rhs: u8)

Performs the *= operation. Read more
Source§

impl Ord for Char

Source§

fn cmp(&self, other: &Char) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq<Char> for char

Source§

fn eq(&self, other: &Char) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<Char> for u8

Source§

fn eq(&self, other: &Char) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<char> for Char

Source§

fn eq(&self, other: &char) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<u8> for Char

Source§

fn eq(&self, other: &u8) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq for Char

Source§

fn eq(&self, other: &Char) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for Char

Source§

fn partial_cmp(&self, other: &Char) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl ReadOneFrom for ASCIIChar

Source§

type ParseError = <Char as FromStr>::Err

Errors that come from parsing.
Source§

fn parse(s: &str) -> Result<Self, ReadOneFromError<Self>>

Parse a string into Self.
Source§

fn try_read_one_from<F: Format, S: BufReadExt>( stream: &mut S, format: F, ) -> Result<Self, ReadOneFromError<Self>>

Read from stream and parse into Self.
Source§

fn accept() -> impl Pattern<Item = char>

Check if a character is acceptable.
Source§

fn try_read_in_char_from<F: Format, S: BufReadExt>( stream: &mut S, format: F, ) -> Result<Self, ReadError<Self::ParseError>>

Read an element in a single non-whitespace character from stream, parse into Self.
Source§

fn try_read_in_line_trimmed_from<F: Format, S: BufReadExt>( stream: &mut S, format: F, ) -> Result<Self, ReadError<Self::ParseError>>

Read an element in the remained line from stream, parse into Self.
Source§

fn try_read_in_line_some_trimmed_from<F: Format, S: BufReadExt>( stream: &mut S, format: F, ) -> Result<Self, ReadError<Self::ParseError>>

Read an element in a single trimmed line that is not empty from stream, parse into Self.
Source§

fn try_read_all_from<F: Format, S: BufReadExt>( stream: &mut S, format: F, ) -> Result<Vec<Self>, ReadError<Self::ParseError>>

Read all remaining elements from stream into a Vec of Self.
Source§

fn try_read_any_in_line_from<F: Format, S: BufReadExt>( stream: &mut S, format: F, ) -> Result<Vec<Self>, ReadError<Self::ParseError>>

Read all elements in current line from stream into a Vec of Self.
Source§

fn try_read_some_in_line_from<F: Format, S: BufReadExt>( stream: &mut S, format: F, ) -> Result<Vec<Self>, ReadError<Self::ParseError>>

Read all elements in a non-empty line from stream into a Vec of Self.
Source§

impl Rem<u8> for Char

Source§

type Output = Char

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: u8) -> Char

Performs the % operation. Read more
Source§

impl RemAssign<u8> for Char

Source§

fn rem_assign(&mut self, rhs: u8)

Performs the %= operation. Read more
Source§

impl Sub<u8> for Char

Source§

type Output = Char

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: u8) -> Char

Performs the - operation. Read more
Source§

impl SubAssign<u8> for Char

Source§

fn sub_assign(&mut self, rhs: u8)

Performs the -= operation. Read more
Source§

impl TryFrom<u8> for Char

Source§

type Error = u8

The type returned in the event of a conversion error.
Source§

fn try_from(value: u8) -> Result<Self, u8>

Performs the conversion.
Source§

impl WriteInto for ASCIIChar

Source§

fn try_write_into_with_sep<S: Write + ?Sized>( &self, s: &mut S, _sep: impl Separators, ) -> Result<()>

Write into a stream with given separator.
Source§

fn try_write_into<S: Write + ?Sized>(&self, s: &mut S) -> Result<()>

Write into a stream using the default separator.
Source§

fn try_write_into_string_with_sep(&self, sep: impl Separators) -> Result<String>

Write into a string with given separator.
Source§

fn try_write_into_string(&self) -> Result<String>

Write into a string using the default separator.
Source§

fn try_write_with_sep(&self, sep: impl Separators) -> Result<()>

Write into std::io::Stdout with given separator.
Source§

fn try_write(&self) -> Result<()>

Write into std::io::Stdout using the default separator.
Source§

impl Copy for Char

Source§

impl Eq for Char

Source§

impl StructuralPartialEq for Char

Auto Trait Implementations§

§

impl Freeze for Char

§

impl RefUnwindSafe for Char

§

impl Send for Char

§

impl Sync for Char

§

impl Unpin for Char

§

impl UnwindSafe for Char

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ReadFrom for T
where T: ReadOneFrom,

Source§

type ParseError = <T as ReadOneFrom>::ParseError

Errors that come from ReadOneFrom.
Source§

fn try_read_from<F, S>( stream: &mut S, format: F, ) -> Result<T, ReadError<<T as ReadFrom>::ParseError>>
where F: Format, S: BufReadExt,

Read from self and parse into Self.
Source§

fn try_read_n_from<F: Format, S: BufReadExt>( stream: &mut S, n: usize, format: F, ) -> Result<Vec<Self>, ReadFromError<Self>>

Read n elements from self, parse into Self and aggregate them into a single Vec.
Source§

fn try_read_m_n_from<F: Format, S: BufReadExt>( stream: &mut S, m: usize, n: usize, format: F, ) -> Result<Mat<Self>, ReadFromError<Self>>

Read m * n elements from self, parse into Self and aggregate them into a single Mat.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.