Enum bounded_integer::examples::BoundedEnum [−][src]
#[repr(i8)]
pub enum BoundedEnum {
Show variants
N8,
N7,
N6,
N5,
N4,
N3,
N2,
N1,
Z,
P1,
P2,
P3,
P4,
P5,
P6,
P7,
}Expand description
A bounded enum.
This was generated from:
bounded_integer! { pub enum BoundedEnum { -8..8 } }
Variants
Implementations
Checks whether the given value is in the range of the bounded integer.
Returns a mutable reference to the value of the bounded integer.
Safety
This value must never be set to a value beyond the range of the bounded integer.
Raises self to the power of exp, using exponentiation by squaring. Panics if it
is out of range.
Calculates the quotient of Euclidean division of self by rhs. Panics if rhs
is 0 or the result is out of range.
Calculates the least nonnegative remainder of self (mod rhs). Panics if rhs is 0
or the result is out of range.
Checked integer addition.
Saturating integer addition.
Checked integer subtraction.
Saturating integer subtraction.
Checked integer multiplication.
Saturating integer multiplication.
Checked integer division.
Checked Euclidean division.
Checked integer remainder.
Checked Euclidean remainder.
Checked negation.
Saturating negation.
Checked absolute value.
Saturating absolute value.
Checked exponentiation.
Saturating exponentiation.
Trait Implementations
type Output = BoundedEnum
type Output = BoundedEnumThe resulting type after applying the + operator.
Performs the + operation. Read more
type Output = BoundedEnum
type Output = BoundedEnumThe resulting type after applying the + operator.
Performs the + operation. Read more
type Output = BoundedEnum
type Output = BoundedEnumThe resulting type after applying the + operator.
Performs the + operation. Read more
type Output = BoundedEnum
type Output = BoundedEnumThe resulting type after applying the + operator.
Performs the + operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
fn deserialize<D>(
deserializer: D
) -> Result<Self, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<Self, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>, Deserialize this value from the given Serde deserializer. Read more
type Output = BoundedEnum
type Output = BoundedEnumThe resulting type after applying the / operator.
Performs the / operation. Read more
type Output = BoundedEnum
type Output = BoundedEnumThe resulting type after applying the / operator.
Performs the / operation. Read more
type Output = BoundedEnum
type Output = BoundedEnumThe resulting type after applying the / operator.
Performs the / operation. Read more
type Output = BoundedEnum
type Output = BoundedEnumThe resulting type after applying the / operator.
Performs the / operation. Read more
Performs the /= operation. Read more
Performs the /= operation. Read more
Performs the /= operation. Read more
Performs the /= operation. Read more
Performs the /= operation. Read more
Performs the /= operation. Read more
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
type Output = BoundedEnum
type Output = BoundedEnumThe resulting type after applying the * operator.
Performs the * operation. Read more
type Output = BoundedEnum
type Output = BoundedEnumThe resulting type after applying the * operator.
Performs the * operation. Read more
type Output = BoundedEnum
type Output = BoundedEnumThe resulting type after applying the * operator.
Performs the * operation. Read more
type Output = BoundedEnum
type Output = BoundedEnumThe resulting type after applying the * operator.
Performs the * operation. Read more
Performs the *= operation. Read more
Performs the *= operation. Read more
Performs the *= operation. Read more
Performs the *= operation. Read more
Performs the *= operation. Read more
Performs the *= operation. Read more
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
Method which takes an iterator and generates Self from the elements by
multiplying the items. Read more
Method which takes an iterator and generates Self from the elements by
multiplying the items. Read more
type Output = BoundedEnum
type Output = BoundedEnumThe resulting type after applying the % operator.
Performs the % operation. Read more
type Output = BoundedEnum
type Output = BoundedEnumThe resulting type after applying the % operator.
Performs the % operation. Read more
type Output = BoundedEnum
type Output = BoundedEnumThe resulting type after applying the % operator.
Performs the % operation. Read more
type Output = BoundedEnum
type Output = BoundedEnumThe resulting type after applying the % operator.
Performs the % operation. Read more
Performs the %= operation. Read more
Performs the %= operation. Read more
Performs the %= operation. Read more
Performs the %= operation. Read more
Performs the %= operation. Read more
Performs the %= operation. Read more
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer, Serialize this value into the given Serde serializer. Read more
🔬 This is a nightly-only experimental API. (step_trait)
recently redesigned
Returns the number of successor steps required to get from start to end. Read more
🔬 This is a nightly-only experimental API. (step_trait)
recently redesigned
Returns the value that would be obtained by taking the successor
of self count times. Read more
🔬 This is a nightly-only experimental API. (step_trait)
recently redesigned
Returns the value that would be obtained by taking the predecessor
of self count times. Read more
🔬 This is a nightly-only experimental API. (step_trait)
recently redesigned
Returns the value that would be obtained by taking the successor
of self count times. Read more
🔬 This is a nightly-only experimental API. (step_trait)
recently redesigned
Returns the value that would be obtained by taking the successor
of self count times. Read more
🔬 This is a nightly-only experimental API. (step_trait)
recently redesigned
Returns the value that would be obtained by taking the predecessor
of self count times. Read more
🔬 This is a nightly-only experimental API. (step_trait)
recently redesigned
Returns the value that would be obtained by taking the predecessor
of self count times. Read more
type Output = BoundedEnum
type Output = BoundedEnumThe resulting type after applying the - operator.
Performs the - operation. Read more
type Output = BoundedEnum
type Output = BoundedEnumThe resulting type after applying the - operator.
Performs the - operation. Read more
type Output = BoundedEnum
type Output = BoundedEnumThe resulting type after applying the - operator.
Performs the - operation. Read more
type Output = BoundedEnum
type Output = BoundedEnumThe resulting type after applying the - operator.
Performs the - operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more
Method which takes an iterator and generates Self from the elements by
“summing up” the items. Read more
Method which takes an iterator and generates Self from the elements by
“summing up” the items. Read more