Skip to main content

EnumintI8Example

Enum EnumintI8Example 

Source
#[repr(i8)]
pub enum EnumintI8Example {
Show 253 variants N126 = -126, N125 = -125, N124 = -124, N123 = -123, N122 = -122, N121 = -121, N120 = -120, N119 = -119, N118 = -118, N117 = -117, N116 = -116, N115 = -115, N114 = -114, N113 = -113, N112 = -112, N111 = -111, N110 = -110, N109 = -109, N108 = -108, N107 = -107, N106 = -106, N105 = -105, N104 = -104, N103 = -103, N102 = -102, N101 = -101, N100 = -100, N99 = -99, N98 = -98, N97 = -97, N96 = -96, N95 = -95, N94 = -94, N93 = -93, N92 = -92, N91 = -91, N90 = -90, N89 = -89, N88 = -88, N87 = -87, N86 = -86, N85 = -85, N84 = -84, N83 = -83, N82 = -82, N81 = -81, N80 = -80, N79 = -79, N78 = -78, N77 = -77, N76 = -76, N75 = -75, N74 = -74, N73 = -73, N72 = -72, N71 = -71, N70 = -70, N69 = -69, N68 = -68, N67 = -67, N66 = -66, N65 = -65, N64 = -64, N63 = -63, N62 = -62, N61 = -61, N60 = -60, N59 = -59, N58 = -58, N57 = -57, N56 = -56, N55 = -55, N54 = -54, N53 = -53, N52 = -52, N51 = -51, N50 = -50, N49 = -49, N48 = -48, N47 = -47, N46 = -46, N45 = -45, N44 = -44, N43 = -43, N42 = -42, N41 = -41, N40 = -40, N39 = -39, N38 = -38, N37 = -37, N36 = -36, N35 = -35, N34 = -34, N33 = -33, N32 = -32, N31 = -31, N30 = -30, N29 = -29, N28 = -28, N27 = -27, N26 = -26, N25 = -25, N24 = -24, N23 = -23, N22 = -22, N21 = -21, N20 = -20, N19 = -19, N18 = -18, N17 = -17, N16 = -16, N15 = -15, N14 = -14, N13 = -13, N12 = -12, N11 = -11, N10 = -10, N9 = -9, N8 = -8, N7 = -7, N6 = -6, N5 = -5, N4 = -4, N3 = -3, N2 = -2, N1 = -1, P0 = 0, P1 = 1, P2 = 2, P3 = 3, P4 = 4, P5 = 5, P6 = 6, P7 = 7, P8 = 8, P9 = 9, P10 = 10, P11 = 11, P12 = 12, P13 = 13, P14 = 14, P15 = 15, P16 = 16, P17 = 17, P18 = 18, P19 = 19, P20 = 20, P21 = 21, P22 = 22, P23 = 23, P24 = 24, P25 = 25, P26 = 26, P27 = 27, P28 = 28, P29 = 29, P30 = 30, P31 = 31, P32 = 32, P33 = 33, P34 = 34, P35 = 35, P36 = 36, P37 = 37, P38 = 38, P39 = 39, P40 = 40, P41 = 41, P42 = 42, P43 = 43, P44 = 44, P45 = 45, P46 = 46, P47 = 47, P48 = 48, P49 = 49, P50 = 50, P51 = 51, P52 = 52, P53 = 53, P54 = 54, P55 = 55, P56 = 56, P57 = 57, P58 = 58, P59 = 59, P60 = 60, P61 = 61, P62 = 62, P63 = 63, P64 = 64, P65 = 65, P66 = 66, P67 = 67, P68 = 68, P69 = 69, P70 = 70, P71 = 71, P72 = 72, P73 = 73, P74 = 74, P75 = 75, P76 = 76, P77 = 77, P78 = 78, P79 = 79, P80 = 80, P81 = 81, P82 = 82, P83 = 83, P84 = 84, P85 = 85, P86 = 86, P87 = 87, P88 = 88, P89 = 89, P90 = 90, P91 = 91, P92 = 92, P93 = 93, P94 = 94, P95 = 95, P96 = 96, P97 = 97, P98 = 98, P99 = 99, P100 = 100, P101 = 101, P102 = 102, P103 = 103, P104 = 104, P105 = 105, P106 = 106, P107 = 107, P108 = 108, P109 = 109, P110 = 110, P111 = 111, P112 = 112, P113 = 113, P114 = 114, P115 = 115, P116 = 116, P117 = 117, P118 = 118, P119 = 119, P120 = 120, P121 = 121, P122 = 122, P123 = 123, P124 = 124, P125 = 125, P126 = 126,
}
Available on doc or test only.
Expand description

⚗️ An example compact i8 enum from -126 to 126, generated with enumint!.

Variants§

§

N126 = -126

§

N125 = -125

§

N124 = -124

§

N123 = -123

§

N122 = -122

§

N121 = -121

§

N120 = -120

§

N119 = -119

§

N118 = -118

§

N117 = -117

§

N116 = -116

§

N115 = -115

§

N114 = -114

§

N113 = -113

§

N112 = -112

§

N111 = -111

§

N110 = -110

§

N109 = -109

§

N108 = -108

§

N107 = -107

§

N106 = -106

§

N105 = -105

§

N104 = -104

§

N103 = -103

§

N102 = -102

§

N101 = -101

§

N100 = -100

§

N99 = -99

§

N98 = -98

§

N97 = -97

§

N96 = -96

§

N95 = -95

§

N94 = -94

§

N93 = -93

§

N92 = -92

§

N91 = -91

§

N90 = -90

§

N89 = -89

§

N88 = -88

§

N87 = -87

§

N86 = -86

§

N85 = -85

§

N84 = -84

§

N83 = -83

§

N82 = -82

§

N81 = -81

§

N80 = -80

§

N79 = -79

§

N78 = -78

§

N77 = -77

§

N76 = -76

§

N75 = -75

§

N74 = -74

§

N73 = -73

§

N72 = -72

§

N71 = -71

§

N70 = -70

§

N69 = -69

§

N68 = -68

§

N67 = -67

§

N66 = -66

§

N65 = -65

§

N64 = -64

§

N63 = -63

§

N62 = -62

§

N61 = -61

§

N60 = -60

§

N59 = -59

§

N58 = -58

§

N57 = -57

§

N56 = -56

§

N55 = -55

§

N54 = -54

§

N53 = -53

§

N52 = -52

§

N51 = -51

§

N50 = -50

§

N49 = -49

§

N48 = -48

§

N47 = -47

§

N46 = -46

§

N45 = -45

§

N44 = -44

§

N43 = -43

§

N42 = -42

§

N41 = -41

§

N40 = -40

§

N39 = -39

§

N38 = -38

§

N37 = -37

§

N36 = -36

§

N35 = -35

§

N34 = -34

§

N33 = -33

§

N32 = -32

§

N31 = -31

§

N30 = -30

§

N29 = -29

§

N28 = -28

§

N27 = -27

§

N26 = -26

§

N25 = -25

§

N24 = -24

§

N23 = -23

§

N22 = -22

§

N21 = -21

§

N20 = -20

§

N19 = -19

§

N18 = -18

§

N17 = -17

§

N16 = -16

§

N15 = -15

§

N14 = -14

§

N13 = -13

§

N12 = -12

§

N11 = -11

§

N10 = -10

§

N9 = -9

§

N8 = -8

§

N7 = -7

§

N6 = -6

§

N5 = -5

§

N4 = -4

§

N3 = -3

§

N2 = -2

§

N1 = -1

§

P0 = 0

§

P1 = 1

§

P2 = 2

§

P3 = 3

§

P4 = 4

§

P5 = 5

§

P6 = 6

§

P7 = 7

§

P8 = 8

§

P9 = 9

§

P10 = 10

§

P11 = 11

§

P12 = 12

§

P13 = 13

§

P14 = 14

§

P15 = 15

§

P16 = 16

§

P17 = 17

§

P18 = 18

§

P19 = 19

§

P20 = 20

§

P21 = 21

§

P22 = 22

§

P23 = 23

§

P24 = 24

§

P25 = 25

§

P26 = 26

§

P27 = 27

§

P28 = 28

§

P29 = 29

§

P30 = 30

§

P31 = 31

§

P32 = 32

§

P33 = 33

§

P34 = 34

§

P35 = 35

§

P36 = 36

§

P37 = 37

§

P38 = 38

§

P39 = 39

§

P40 = 40

§

P41 = 41

§

P42 = 42

§

P43 = 43

§

P44 = 44

§

P45 = 45

§

P46 = 46

§

P47 = 47

§

P48 = 48

§

P49 = 49

§

P50 = 50

§

P51 = 51

§

P52 = 52

§

P53 = 53

§

P54 = 54

§

P55 = 55

§

P56 = 56

§

P57 = 57

§

P58 = 58

§

P59 = 59

§

P60 = 60

§

P61 = 61

§

P62 = 62

§

P63 = 63

§

P64 = 64

§

P65 = 65

§

P66 = 66

§

P67 = 67

§

P68 = 68

§

P69 = 69

§

P70 = 70

§

P71 = 71

§

P72 = 72

§

P73 = 73

§

P74 = 74

§

P75 = 75

§

P76 = 76

§

P77 = 77

§

P78 = 78

§

P79 = 79

§

P80 = 80

§

P81 = 81

§

P82 = 82

§

P83 = 83

§

P84 = 84

§

P85 = 85

§

P86 = 86

§

P87 = 87

§

P88 = 88

§

P89 = 89

§

P90 = 90

§

P91 = 91

§

P92 = 92

§

P93 = 93

§

P94 = 94

§

P95 = 95

§

P96 = 96

§

P97 = 97

§

P98 = 98

§

P99 = 99

§

P100 = 100

§

P101 = 101

§

P102 = 102

§

P103 = 103

§

P104 = 104

§

P105 = 105

§

P106 = 106

§

P107 = 107

§

P108 = 108

§

P109 = 109

§

P110 = 110

§

P111 = 111

§

P112 = 112

§

P113 = 113

§

P114 = 114

§

P115 = 115

§

P116 = 116

§

P117 = 117

§

P118 = 118

§

P119 = 119

§

P120 = 120

§

P121 = 121

§

P122 = 122

§

P123 = 123

§

P124 = 124

§

P125 = 125

§

P126 = 126

Implementations§

Source§

impl EnumintI8Example

Source

pub const VALUES: usize

The number of represented values.

Source

pub const NICHES: usize

The number of unused representation values available as niches.

Source

pub const MIN: i8

The lowest represented integer.

Source

pub const MAX: i8

The highest represented integer.

Source

pub const fn new(value: i8) -> Option<Self>

Returns the variant for value, or None if it is outside the range.

Source

pub const fn new_saturated(value: i8) -> Self

Returns the variant for value, clamped to the represented range.

Source

pub const fn new_wrapped(value: i8) -> Self

Returns the variant for value, wrapped inside the represented range.

Source

pub const fn get(self) -> i8

Returns the underlying integer representation.

Trait Implementations§

Source§

impl Clone for EnumintI8Example

Source§

fn clone(&self) -> EnumintI8Example

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for EnumintI8Example

Source§

impl Debug for EnumintI8Example

Source§

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

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

impl Eq for EnumintI8Example

Source§

impl Hash for EnumintI8Example

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 Ord for EnumintI8Example

Source§

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

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

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

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

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

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

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

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

impl PartialEq for EnumintI8Example

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · 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 EnumintI8Example

Source§

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

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · 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 StructuralPartialEq for EnumintI8Example

Auto Trait Implementations§

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> AnyExt for T
where T: Any + ?Sized,

Source§

fn type_id() -> TypeId

Returns the TypeId of Self. Read more
Source§

fn type_of(&self) -> TypeId

Returns the TypeId of self. Read more
Source§

fn type_name(&self) -> &'static str

Returns the type name of self. Read more
Source§

fn type_is<T: 'static>(&self) -> bool

Returns true if Self is of type T. Read more
Source§

fn type_hash(&self) -> u64

Returns a deterministic hash of the TypeId of Self.
Source§

fn type_hash_with<H: Hasher>(&self, hasher: H) -> u64

Returns a deterministic hash of the TypeId of Self using a custom hasher.
Source§

fn as_any_ref(&self) -> &dyn Any
where Self: Sized,

Upcasts &self as &dyn Any. Read more
Source§

fn as_any_mut(&mut self) -> &mut dyn Any
where Self: Sized,

Upcasts &mut self as &mut dyn Any. Read more
Source§

fn as_any_box(self: Box<Self>) -> Box<dyn Any>
where Self: Sized,

Available on crate feature alloc only.
Upcasts Box<self> as Box<dyn Any>. Read more
Source§

fn downcast_ref<T: 'static>(&self) -> Option<&T>

Available on crate feature unsafe_layout and non-crate feature safe_code only.
Returns some shared reference to the inner value if it is of type T. Read more
Source§

fn downcast_mut<T: 'static>(&mut self) -> Option<&mut T>

Available on crate feature unsafe_layout and non-crate feature safe_code only.
Returns some exclusive reference to the inner value if it is of type T. 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> ByteSized for T

Source§

const BYTE_ALIGN: usize = _

The alignment of this type in bytes.
Source§

const BYTE_SIZE: usize = _

The size of this type in bytes.
Source§

fn byte_align(&self) -> usize

Returns the alignment of this type in bytes.
Source§

fn byte_size(&self) -> usize

Returns the size of this type in bytes. Read more
Source§

fn ptr_size_ratio(&self) -> [usize; 2]

Returns the size ratio between Ptr::BYTES and BYTE_SIZE. 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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Hook for T

Source§

fn hook<F>(self, f: F) -> Self
where F: FnOnce(&mut Self),

Hooks a mutation step into the value and returns it. Read more
Source§

fn tap<F>(self, f: F) -> Self
where F: FnOnce(&Self),

Taps into the value for observation and returns it unchanged. Read more
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> MemExt for T
where T: ?Sized,

Source§

const NEEDS_DROP: bool = _

Know whether dropping values of this type matters, in compile-time.
Source§

fn mem_align_of<T>() -> usize

Returns the minimum alignment of the type in bytes. Read more
Source§

fn mem_align_of_val(&self) -> usize

Returns the alignment of the pointed-to value in bytes. Read more
Source§

fn mem_size_of<T>() -> usize

Returns the size of a type in bytes. Read more
Source§

fn mem_size_of_val(&self) -> usize

Returns the size of the pointed-to value in bytes. Read more
Source§

fn mem_copy(&self) -> Self
where Self: Copy,

Bitwise-copies a value. Read more
Source§

fn mem_needs_drop(&self) -> bool

Returns true if dropping values of this type matters. Read more
Source§

fn mem_drop(self)
where Self: Sized,

Drops self by running its destructor. Read more
Source§

fn mem_forget(self)
where Self: Sized,

Forgets about self without running its destructor. Read more
Source§

fn mem_replace(&mut self, other: Self) -> Self
where Self: Sized,

Replaces self with other, returning the previous value of self. Read more
Source§

fn mem_take(&mut self) -> Self
where Self: Default,

Replaces self with its default value, returning the previous value of self. Read more
Source§

fn mem_swap(&mut self, other: &mut Self)
where Self: Sized,

Swaps the value of self and other without deinitializing either one. Read more
Source§

unsafe fn mem_zeroed<T>() -> T

Available on crate feature unsafe_layout only.
Returns the value of type T represented by the all-zero byte-pattern. Read more
Source§

unsafe fn mem_transmute_copy<Src, Dst>(src: &Src) -> Dst

Available on crate feature unsafe_layout only.
Returns the value of type T represented by the all-zero byte-pattern. Read more
Source§

fn mem_as_bytes(&self) -> &[u8]
where Self: Sync + Unpin,

Available on crate feature unsafe_slice only.
View a Sync + Unpin self as &[u8]. Read more
Source§

fn mem_as_bytes_mut(&mut self) -> &mut [u8]
where Self: Sync + Unpin,

Available on crate feature unsafe_slice only.
View a Sync + Unpin self as &mut [u8]. Read more
Source§

impl<T, R> Morph<R> for T
where T: ?Sized,

Source§

fn morph<F>(self, f: F) -> R
where F: FnOnce(Self) -> R, Self: Sized,

Morphs the value into a new one and returns it. Read more
Source§

fn morph_ref<F>(&self, f: F) -> R
where F: FnOnce(&Self) -> R,

Morphs the value by shared reference and returns the result. Read more
Source§

fn morph_mut<F>(&mut self, f: F) -> R
where F: FnOnce(&mut Self) -> R,

Morphs the value by exclusive reference and returns the result. Read more
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, 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.