Struct bounded_integer::examples::BoundedStruct [−][src]
#[repr(transparent)]pub struct BoundedStruct(_);
Expand description
A bounded struct, implemented as a protected newtype.
This was generated from:
bounded_integer! { pub struct BoundedStruct { -8..8 } }
Implementations
Checks whether the given value is in the range of the bounded integer.
Returns a shared reference to the value 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 = BoundedStruct
type Output = BoundedStruct
The resulting type after applying the +
operator.
Performs the +
operation. Read more
type Output = BoundedStruct
type Output = BoundedStruct
The resulting type after applying the +
operator.
Performs the +
operation. Read more
type Output = BoundedStruct
type Output = BoundedStruct
The resulting type after applying the +
operator.
Performs the +
operation. Read more
type Output = BoundedStruct
type Output = BoundedStruct
The 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 = BoundedStruct
type Output = BoundedStruct
The resulting type after applying the /
operator.
Performs the /
operation. Read more
type Output = BoundedStruct
type Output = BoundedStruct
The resulting type after applying the /
operator.
Performs the /
operation. Read more
type Output = BoundedStruct
type Output = BoundedStruct
The resulting type after applying the /
operator.
Performs the /
operation. Read more
type Output = BoundedStruct
type Output = BoundedStruct
The 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 = BoundedStruct
type Output = BoundedStruct
The resulting type after applying the *
operator.
Performs the *
operation. Read more
type Output = BoundedStruct
type Output = BoundedStruct
The resulting type after applying the *
operator.
Performs the *
operation. Read more
type Output = BoundedStruct
type Output = BoundedStruct
The resulting type after applying the *
operator.
Performs the *
operation. Read more
type Output = BoundedStruct
type Output = BoundedStruct
The 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 tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
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 = BoundedStruct
type Output = BoundedStruct
The resulting type after applying the %
operator.
Performs the %
operation. Read more
type Output = BoundedStruct
type Output = BoundedStruct
The resulting type after applying the %
operator.
Performs the %
operation. Read more
type Output = BoundedStruct
type Output = BoundedStruct
The resulting type after applying the %
operator.
Performs the %
operation. Read more
type Output = BoundedStruct
type Output = BoundedStruct
The 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 = BoundedStruct
type Output = BoundedStruct
The resulting type after applying the -
operator.
Performs the -
operation. Read more
type Output = BoundedStruct
type Output = BoundedStruct
The resulting type after applying the -
operator.
Performs the -
operation. Read more
type Output = BoundedStruct
type Output = BoundedStruct
The resulting type after applying the -
operator.
Performs the -
operation. Read more
type Output = BoundedStruct
type Output = BoundedStruct
The 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