Struct bounded_types::BoundedU32 [−][src]
Expand description
An u32 element that is forced to be within the inclusive range MIN..=MAX.
Implementations
impl<const MIN: u32, const MAX: u32> BoundedU32<MIN, MAX>[src]
impl<const MIN: u32, const MAX: u32> BoundedU32<MIN, MAX>[src]#[must_use]pub fn unchecked(&self) -> u32[src]
#[must_use]pub fn unchecked(&self) -> u32[src]Returns the numeric value stored in the struct, but overrides the bounds check.
pub fn is_in_bounds(val: &impl PartialOrd<u32>) -> bool[src]
pub fn is_in_bounds(val: &impl PartialOrd<u32>) -> bool[src]Function that returns whether a value is within the bounds.
Methods from Deref<Target = Result<u32, OutOfBoundsError<MIN, MAX>>>
#[must_use = "if you intended to assert that this is ok, consider `.unwrap()` instead"]pub const fn is_ok(&self) -> bool1.0.0 (const: 1.48.0)[src]
#[must_use = "if you intended to assert that this is ok, consider `.unwrap()` instead"]pub const fn is_ok(&self) -> bool1.0.0 (const: 1.48.0)[src]#[must_use = "if you intended to assert that this is err, consider `.unwrap_err()` instead"]pub const fn is_err(&self) -> bool1.0.0 (const: 1.48.0)[src]
#[must_use = "if you intended to assert that this is err, consider `.unwrap_err()` instead"]pub const fn is_err(&self) -> bool1.0.0 (const: 1.48.0)[src]#[must_use]pub fn contains<U>(&self, x: &U) -> bool where
U: PartialEq<T>, [src]
🔬 This is a nightly-only experimental API. (option_result_contains)
#[must_use]pub fn contains<U>(&self, x: &U) -> bool where
U: PartialEq<T>, [src]option_result_contains)Returns true if the result is an Ok value containing the given value.
Examples
#![feature(option_result_contains)] let x: Result<u32, &str> = Ok(2); assert_eq!(x.contains(&2), true); let x: Result<u32, &str> = Ok(3); assert_eq!(x.contains(&2), false); let x: Result<u32, &str> = Err("Some error message"); assert_eq!(x.contains(&2), false);
#[must_use]pub fn contains_err<F>(&self, f: &F) -> bool where
F: PartialEq<E>, [src]
🔬 This is a nightly-only experimental API. (result_contains_err)
#[must_use]pub fn contains_err<F>(&self, f: &F) -> bool where
F: PartialEq<E>, [src]result_contains_err)Returns true if the result is an Err value containing the given value.
Examples
#![feature(result_contains_err)] let x: Result<u32, &str> = Ok(2); assert_eq!(x.contains_err(&"Some error message"), false); let x: Result<u32, &str> = Err("Some error message"); assert_eq!(x.contains_err(&"Some error message"), true); let x: Result<u32, &str> = Err("Some other error message"); assert_eq!(x.contains_err(&"Some error message"), false);
pub const fn as_ref(&self) -> Result<&T, &E>1.0.0 (const: 1.48.0)[src]
pub const fn as_ref(&self) -> Result<&T, &E>1.0.0 (const: 1.48.0)[src]Converts from &Result<T, E> to Result<&T, &E>.
Produces a new Result, containing a reference
into the original, leaving the original in place.
Examples
Basic usage:
let x: Result<u32, &str> = Ok(2); assert_eq!(x.as_ref(), Ok(&2)); let x: Result<u32, &str> = Err("Error"); assert_eq!(x.as_ref(), Err(&"Error"));
pub fn iter(&self) -> Iter<'_, T>1.0.0[src]
pub fn iter(&self) -> Iter<'_, T>1.0.0[src]Returns an iterator over the possibly contained value.
The iterator yields one value if the result is Result::Ok, otherwise none.
Examples
Basic usage:
let x: Result<u32, &str> = Ok(7); assert_eq!(x.iter().next(), Some(&7)); let x: Result<u32, &str> = Err("nothing!"); assert_eq!(x.iter().next(), None);
pub fn as_deref(&self) -> Result<&<T as Deref>::Target, &E>1.47.0[src]
pub fn as_deref(&self) -> Result<&<T as Deref>::Target, &E>1.47.0[src]Converts from Result<T, E> (or &Result<T, E>) to Result<&<T as Deref>::Target, &E>.
Coerces the Ok variant of the original Result via Deref
and returns the new Result.
Examples
let x: Result<String, u32> = Ok("hello".to_string()); let y: Result<&str, &u32> = Ok("hello"); assert_eq!(x.as_deref(), y); let x: Result<String, u32> = Err(42); let y: Result<&str, &u32> = Err(&42); assert_eq!(x.as_deref(), y);
Trait Implementations
impl<const MIN: u32, const MAX: u32> AsRef<Result<u32, OutOfBoundsError<MIN, MAX>>> for BoundedU32<MIN, MAX>[src]
impl<const MIN: u32, const MAX: u32> AsRef<Result<u32, OutOfBoundsError<MIN, MAX>>> for BoundedU32<MIN, MAX>[src]impl<const MIN: u32, const MAX: u32> Borrow<Result<u32, OutOfBoundsError<MIN, MAX>>> for BoundedU32<MIN, MAX>[src]
impl<const MIN: u32, const MAX: u32> Borrow<Result<u32, OutOfBoundsError<MIN, MAX>>> for BoundedU32<MIN, MAX>[src]impl<const MIN: u32, const MAX: u32> Debug for BoundedU32<MIN, MAX>[src]
impl<const MIN: u32, const MAX: u32> Debug for BoundedU32<MIN, MAX>[src]impl<const MIN: u32, const MAX: u32> Deref for BoundedU32<MIN, MAX>[src]
impl<const MIN: u32, const MAX: u32> Deref for BoundedU32<MIN, MAX>[src]impl<const MIN: u32, const MAX: u32> Display for BoundedU32<MIN, MAX>[src]
impl<const MIN: u32, const MAX: u32> Display for BoundedU32<MIN, MAX>[src]impl<const MIN: u32, const MAX: u32> FromStr for BoundedU32<MIN, MAX>[src]
impl<const MIN: u32, const MAX: u32> FromStr for BoundedU32<MIN, MAX>[src]impl<const MIN: u32, const MAX: u32> PartialEq<BoundedU32<MIN, MAX>> for BoundedU32<MIN, MAX>[src]
impl<const MIN: u32, const MAX: u32> PartialEq<BoundedU32<MIN, MAX>> for BoundedU32<MIN, MAX>[src]impl<const MIN: u32, const MAX: u32> PartialEq<BoundedU32<MIN, MAX>> for u8[src]
impl<const MIN: u32, const MAX: u32> PartialEq<BoundedU32<MIN, MAX>> for u8[src]Inferred through symmetry.
impl<const MIN: u32, const MAX: u32> PartialEq<BoundedU32<MIN, MAX>> for i64[src]
impl<const MIN: u32, const MAX: u32> PartialEq<BoundedU32<MIN, MAX>> for i64[src]Inferred through symmetry.
impl<const MIN: u32, const MAX: u32> PartialEq<BoundedU32<MIN, MAX>> for i128[src]
impl<const MIN: u32, const MAX: u32> PartialEq<BoundedU32<MIN, MAX>> for i128[src]Inferred through symmetry.
impl<const MIN: u32, const MAX: u32> PartialEq<BoundedU32<MIN, MAX>> for isize[src]
impl<const MIN: u32, const MAX: u32> PartialEq<BoundedU32<MIN, MAX>> for isize[src]Inferred through symmetry.
impl<const MIN: u32, const MAX: u32> PartialEq<BoundedU32<MIN, MAX>> for u16[src]
impl<const MIN: u32, const MAX: u32> PartialEq<BoundedU32<MIN, MAX>> for u16[src]Inferred through symmetry.
impl<const MIN: u32, const MAX: u32> PartialEq<BoundedU32<MIN, MAX>> for u32[src]
impl<const MIN: u32, const MAX: u32> PartialEq<BoundedU32<MIN, MAX>> for u32[src]Inferred through symmetry.
impl<const MIN: u32, const MAX: u32> PartialEq<BoundedU32<MIN, MAX>> for u64[src]
impl<const MIN: u32, const MAX: u32> PartialEq<BoundedU32<MIN, MAX>> for u64[src]Inferred through symmetry.
impl<const MIN: u32, const MAX: u32> PartialEq<BoundedU32<MIN, MAX>> for u128[src]
impl<const MIN: u32, const MAX: u32> PartialEq<BoundedU32<MIN, MAX>> for u128[src]Inferred through symmetry.
impl<const MIN: u32, const MAX: u32> PartialEq<BoundedU32<MIN, MAX>> for usize[src]
impl<const MIN: u32, const MAX: u32> PartialEq<BoundedU32<MIN, MAX>> for usize[src]Inferred through symmetry.
impl<const MIN: u32, const MAX: u32> PartialEq<BoundedU32<MIN, MAX>> for i8[src]
impl<const MIN: u32, const MAX: u32> PartialEq<BoundedU32<MIN, MAX>> for i8[src]Inferred through symmetry.
impl<const MIN: u32, const MAX: u32> PartialEq<BoundedU32<MIN, MAX>> for i16[src]
impl<const MIN: u32, const MAX: u32> PartialEq<BoundedU32<MIN, MAX>> for i16[src]Inferred through symmetry.
impl<const MIN: u32, const MAX: u32> PartialEq<BoundedU32<MIN, MAX>> for i32[src]
impl<const MIN: u32, const MAX: u32> PartialEq<BoundedU32<MIN, MAX>> for i32[src]Inferred through symmetry.
impl<const MIN: u32, const MAX: u32> PartialOrd<BoundedU32<MIN, MAX>> for BoundedU32<MIN, MAX>[src]
impl<const MIN: u32, const MAX: u32> PartialOrd<BoundedU32<MIN, MAX>> for BoundedU32<MIN, MAX>[src]fn partial_cmp(&self, other: &Self) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>[src]This method returns an ordering between self and other values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl<const MIN: u32, const MAX: u32> PartialOrd<BoundedU32<MIN, MAX>> for u8[src]
impl<const MIN: u32, const MAX: u32> PartialOrd<BoundedU32<MIN, MAX>> for u8[src]Inferred through assymetry.
fn partial_cmp(&self, other: &BoundedU32<MIN, MAX>) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &BoundedU32<MIN, MAX>) -> Option<Ordering>[src]This method returns an ordering between self and other values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl<const MIN: u32, const MAX: u32> PartialOrd<BoundedU32<MIN, MAX>> for i64[src]
impl<const MIN: u32, const MAX: u32> PartialOrd<BoundedU32<MIN, MAX>> for i64[src]Inferred through assymetry.
fn partial_cmp(&self, other: &BoundedU32<MIN, MAX>) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &BoundedU32<MIN, MAX>) -> Option<Ordering>[src]This method returns an ordering between self and other values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl<const MIN: u32, const MAX: u32> PartialOrd<BoundedU32<MIN, MAX>> for i128[src]
impl<const MIN: u32, const MAX: u32> PartialOrd<BoundedU32<MIN, MAX>> for i128[src]Inferred through assymetry.
fn partial_cmp(&self, other: &BoundedU32<MIN, MAX>) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &BoundedU32<MIN, MAX>) -> Option<Ordering>[src]This method returns an ordering between self and other values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl<const MIN: u32, const MAX: u32> PartialOrd<BoundedU32<MIN, MAX>> for isize[src]
impl<const MIN: u32, const MAX: u32> PartialOrd<BoundedU32<MIN, MAX>> for isize[src]Inferred through assymetry.
fn partial_cmp(&self, other: &BoundedU32<MIN, MAX>) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &BoundedU32<MIN, MAX>) -> Option<Ordering>[src]This method returns an ordering between self and other values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl<const MIN: u32, const MAX: u32> PartialOrd<BoundedU32<MIN, MAX>> for u16[src]
impl<const MIN: u32, const MAX: u32> PartialOrd<BoundedU32<MIN, MAX>> for u16[src]Inferred through assymetry.
fn partial_cmp(&self, other: &BoundedU32<MIN, MAX>) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &BoundedU32<MIN, MAX>) -> Option<Ordering>[src]This method returns an ordering between self and other values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl<const MIN: u32, const MAX: u32> PartialOrd<BoundedU32<MIN, MAX>> for u32[src]
impl<const MIN: u32, const MAX: u32> PartialOrd<BoundedU32<MIN, MAX>> for u32[src]Inferred through assymetry.
fn partial_cmp(&self, other: &BoundedU32<MIN, MAX>) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &BoundedU32<MIN, MAX>) -> Option<Ordering>[src]This method returns an ordering between self and other values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl<const MIN: u32, const MAX: u32> PartialOrd<BoundedU32<MIN, MAX>> for u64[src]
impl<const MIN: u32, const MAX: u32> PartialOrd<BoundedU32<MIN, MAX>> for u64[src]Inferred through assymetry.
fn partial_cmp(&self, other: &BoundedU32<MIN, MAX>) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &BoundedU32<MIN, MAX>) -> Option<Ordering>[src]This method returns an ordering between self and other values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl<const MIN: u32, const MAX: u32> PartialOrd<BoundedU32<MIN, MAX>> for u128[src]
impl<const MIN: u32, const MAX: u32> PartialOrd<BoundedU32<MIN, MAX>> for u128[src]Inferred through assymetry.
fn partial_cmp(&self, other: &BoundedU32<MIN, MAX>) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &BoundedU32<MIN, MAX>) -> Option<Ordering>[src]This method returns an ordering between self and other values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl<const MIN: u32, const MAX: u32> PartialOrd<BoundedU32<MIN, MAX>> for usize[src]
impl<const MIN: u32, const MAX: u32> PartialOrd<BoundedU32<MIN, MAX>> for usize[src]Inferred through assymetry.
fn partial_cmp(&self, other: &BoundedU32<MIN, MAX>) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &BoundedU32<MIN, MAX>) -> Option<Ordering>[src]This method returns an ordering between self and other values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl<const MIN: u32, const MAX: u32> PartialOrd<BoundedU32<MIN, MAX>> for i8[src]
impl<const MIN: u32, const MAX: u32> PartialOrd<BoundedU32<MIN, MAX>> for i8[src]Inferred through assymetry.
fn partial_cmp(&self, other: &BoundedU32<MIN, MAX>) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &BoundedU32<MIN, MAX>) -> Option<Ordering>[src]This method returns an ordering between self and other values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl<const MIN: u32, const MAX: u32> PartialOrd<BoundedU32<MIN, MAX>> for i16[src]
impl<const MIN: u32, const MAX: u32> PartialOrd<BoundedU32<MIN, MAX>> for i16[src]Inferred through assymetry.
fn partial_cmp(&self, other: &BoundedU32<MIN, MAX>) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &BoundedU32<MIN, MAX>) -> Option<Ordering>[src]This method returns an ordering between self and other values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl<const MIN: u32, const MAX: u32> PartialOrd<BoundedU32<MIN, MAX>> for i32[src]
impl<const MIN: u32, const MAX: u32> PartialOrd<BoundedU32<MIN, MAX>> for i32[src]Inferred through assymetry.
fn partial_cmp(&self, other: &BoundedU32<MIN, MAX>) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &BoundedU32<MIN, MAX>) -> Option<Ordering>[src]This method returns an ordering between self and other values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl<const MIN: u32, const MAX: u32> PartialOrd<i128> for BoundedU32<MIN, MAX>[src]
impl<const MIN: u32, const MAX: u32> PartialOrd<i128> for BoundedU32<MIN, MAX>[src]fn partial_cmp(&self, other: &i128) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &i128) -> Option<Ordering>[src]This method returns an ordering between self and other values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl<const MIN: u32, const MAX: u32> PartialOrd<i16> for BoundedU32<MIN, MAX>[src]
impl<const MIN: u32, const MAX: u32> PartialOrd<i16> for BoundedU32<MIN, MAX>[src]fn partial_cmp(&self, other: &i16) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &i16) -> Option<Ordering>[src]This method returns an ordering between self and other values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl<const MIN: u32, const MAX: u32> PartialOrd<i32> for BoundedU32<MIN, MAX>[src]
impl<const MIN: u32, const MAX: u32> PartialOrd<i32> for BoundedU32<MIN, MAX>[src]fn partial_cmp(&self, other: &i32) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &i32) -> Option<Ordering>[src]This method returns an ordering between self and other values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl<const MIN: u32, const MAX: u32> PartialOrd<i64> for BoundedU32<MIN, MAX>[src]
impl<const MIN: u32, const MAX: u32> PartialOrd<i64> for BoundedU32<MIN, MAX>[src]fn partial_cmp(&self, other: &i64) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &i64) -> Option<Ordering>[src]This method returns an ordering between self and other values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl<const MIN: u32, const MAX: u32> PartialOrd<i8> for BoundedU32<MIN, MAX>[src]
impl<const MIN: u32, const MAX: u32> PartialOrd<i8> for BoundedU32<MIN, MAX>[src]fn partial_cmp(&self, other: &i8) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &i8) -> Option<Ordering>[src]This method returns an ordering between self and other values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl<const MIN: u32, const MAX: u32> PartialOrd<isize> for BoundedU32<MIN, MAX>[src]
impl<const MIN: u32, const MAX: u32> PartialOrd<isize> for BoundedU32<MIN, MAX>[src]fn partial_cmp(&self, other: &isize) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &isize) -> Option<Ordering>[src]This method returns an ordering between self and other values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl<const MIN: u32, const MAX: u32> PartialOrd<u128> for BoundedU32<MIN, MAX>[src]
impl<const MIN: u32, const MAX: u32> PartialOrd<u128> for BoundedU32<MIN, MAX>[src]fn partial_cmp(&self, other: &u128) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &u128) -> Option<Ordering>[src]This method returns an ordering between self and other values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl<const MIN: u32, const MAX: u32> PartialOrd<u16> for BoundedU32<MIN, MAX>[src]
impl<const MIN: u32, const MAX: u32> PartialOrd<u16> for BoundedU32<MIN, MAX>[src]fn partial_cmp(&self, other: &u16) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &u16) -> Option<Ordering>[src]This method returns an ordering between self and other values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl<const MIN: u32, const MAX: u32> PartialOrd<u32> for BoundedU32<MIN, MAX>[src]
impl<const MIN: u32, const MAX: u32> PartialOrd<u32> for BoundedU32<MIN, MAX>[src]fn partial_cmp(&self, other: &u32) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &u32) -> Option<Ordering>[src]This method returns an ordering between self and other values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl<const MIN: u32, const MAX: u32> PartialOrd<u64> for BoundedU32<MIN, MAX>[src]
impl<const MIN: u32, const MAX: u32> PartialOrd<u64> for BoundedU32<MIN, MAX>[src]fn partial_cmp(&self, other: &u64) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &u64) -> Option<Ordering>[src]This method returns an ordering between self and other values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl<const MIN: u32, const MAX: u32> PartialOrd<u8> for BoundedU32<MIN, MAX>[src]
impl<const MIN: u32, const MAX: u32> PartialOrd<u8> for BoundedU32<MIN, MAX>[src]fn partial_cmp(&self, other: &u8) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &u8) -> Option<Ordering>[src]This method returns an ordering between self and other values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl<const MIN: u32, const MAX: u32> PartialOrd<usize> for BoundedU32<MIN, MAX>[src]
impl<const MIN: u32, const MAX: u32> PartialOrd<usize> for BoundedU32<MIN, MAX>[src]fn partial_cmp(&self, other: &usize) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &usize) -> Option<Ordering>[src]This method returns an ordering between self and other values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
Auto Trait Implementations
impl<const MIN: u32, const MAX: u32> RefUnwindSafe for BoundedU32<MIN, MAX>
impl<const MIN: u32, const MAX: u32> Send for BoundedU32<MIN, MAX>
impl<const MIN: u32, const MAX: u32> Sync for BoundedU32<MIN, MAX>
impl<const MIN: u32, const MAX: u32> Unpin for BoundedU32<MIN, MAX>
impl<const MIN: u32, const MAX: u32> UnwindSafe for BoundedU32<MIN, MAX>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more