matrix_sdk::ruma

Struct UInt

Source
pub struct UInt(/* private fields */);
Expand description

An integer limited to the range of non-negative integers that can be represented exactly by an f64.

Implementations§

Source§

impl UInt

Source

pub const MIN: UInt = _

The smallest value that can be represented by this integer type.

§Examples

Basic usage:

assert_eq!(UInt::MIN, uint!(0));
Source

pub const MAX: UInt = _

The largest value that can be represented by this integer type.

§Examples

Basic usage:

assert_eq!(UInt::MAX, UInt::try_from(9_007_199_254_740_991u64).unwrap());
Source

pub fn new(val: u64) -> Option<UInt>

Try to create a UInt from the provided u64, returning None if it is larger than MAX_SAFE_UINT.

This is the same as the TryFrom<u64> implementation for UInt, except that it returns an Option instead of a Result.

§Examples

Basic usage:

assert_eq!(UInt::new(js_int::MAX_SAFE_UINT), Some(UInt::MAX));
assert_eq!(UInt::new(js_int::MAX_SAFE_UINT + 1), None);
Source

pub fn new_wrapping(val: u64) -> UInt

Create a UInt from the provided u64, wrapping at MAX_SAFE_UINT.

§Examples

Basic usage:

assert_eq!(UInt::new_wrapping(js_int::MAX_SAFE_UINT), UInt::MAX);
assert_eq!(UInt::new_wrapping(js_int::MAX_SAFE_UINT + 1), uint!(0));
Source

pub fn new_saturating(val: u64) -> UInt

Creates an UInt from the given u64 capped at MAX_SAFE_UINT.

§Examples

Basic usage:

assert_eq!(UInt::new_saturating(0), uint!(0));
assert_eq!(UInt::new_saturating(js_int::MAX_SAFE_UINT), UInt::MAX);
assert_eq!(UInt::new_saturating(js_int::MAX_SAFE_UINT + 1), UInt::MAX);
Source

pub const fn min_value() -> UInt

👎Deprecated: Use UInt::MIN instead.

Returns the smallest value that can be represented by this integer type.

§Examples

Basic usage:

assert_eq!(UInt::min_value(), uint!(0));
Source

pub const fn max_value() -> UInt

👎Deprecated: Use UInt::MAX instead.

Returns the largest value that can be represented by this integer type.

§Examples

Basic usage:

assert_eq!(UInt::max_value(), UInt::try_from(9_007_199_254_740_991u64).unwrap());
Source

pub fn is_power_of_two(self) -> bool

Returns true if and only if self == 2^k for some k.

§Examples

Basic usage:

assert!(uint!(16).is_power_of_two());
assert!(!uint!(10).is_power_of_two());
Source

pub fn checked_next_power_of_two(self) -> Option<UInt>

Returns the smallest power of two greater than or equal to n. If the next power of two is greater than the type’s maximum value, None is returned, otherwise the power of two is wrapped in Some.

§Examples

Basic usage:

assert_eq!(uint!(2).checked_next_power_of_two(), Some(uint!(2)));
assert_eq!(uint!(3).checked_next_power_of_two(), Some(uint!(4)));
assert_eq!(UInt::MAX.checked_next_power_of_two(), None);
Source

pub fn from_str_radix(src: &str, radix: u32) -> Result<UInt, ParseIntError>

Converts a string slice in a given base to an integer.

The string is expected to be an optional + sign followed by digits. Leading and trailing whitespace represent an error. Digits are a subset of these characters, depending on radix:

  • 0-9
  • a-z
  • A-Z
§Panics

This function panics if radix is not in the range from 2 to 36.

§Examples

Basic usage:

assert_eq!(UInt::from_str_radix("A", 16), Ok(uint!(10)));
Source

pub fn checked_add(self, rhs: UInt) -> Option<UInt>

Checked integer addition. Computes self + rhs, returning None if overflow occurred.

assert_eq!(
    (UInt::MAX - uint!(2)).checked_add(uint!(1)),
    Some(UInt::MAX - uint!(1))
);
assert_eq!((UInt::MAX - uint!(2)).checked_add(uint!(3)), None);
Source

pub fn checked_sub(self, rhs: UInt) -> Option<UInt>

Checked integer subtraction. Computes self - rhs, returning None if overflow occurred.

§Examples

Basic usage:

assert_eq!(uint!(1).checked_sub(uint!(1)), Some(uint!(0)));
assert_eq!(uint!(0).checked_sub(uint!(1)), None);
Source

pub fn checked_mul(self, rhs: UInt) -> Option<UInt>

Checked integer multiplication. Computes self * rhs, returning None if overflow occurred.

§Examples

Basic usage:

assert_eq!(uint!(5).checked_mul(uint!(1)), Some(uint!(5)));
assert_eq!(UInt::MAX.checked_mul(uint!(2)), None);
Source

pub fn checked_div(self, rhs: UInt) -> Option<UInt>

Checked integer division. Computes self / rhs, returning None if rhs == 0.

§Examples

Basic usage:

assert_eq!(uint!(128).checked_div(uint!(2)), Some(uint!(64)));
assert_eq!(uint!(1).checked_div(uint!(0)), None);
Source

pub fn checked_rem(self, rhs: UInt) -> Option<UInt>

Checked integer remainder. Computes self % rhs, returning None if rhs == 0.

§Examples

Basic usage:

assert_eq!(uint!(5).checked_rem(uint!(2)), Some(uint!(1)));
assert_eq!(uint!(5).checked_rem(uint!(0)), None);
Source

pub fn checked_neg(self) -> Option<UInt>

Checked negation. Computes -self, returning None unless self == 0.

Note that negating any positive integer will overflow.

§Examples

Basic usage:

assert_eq!(uint!(0).checked_neg(), Some(uint!(0)));
assert_eq!(uint!(1).checked_neg(), None);
Source

pub fn checked_pow(self, exp: u32) -> Option<UInt>

Checked exponentiation. Computes self.pow(exp), returning None if overflow or underflow occurred.

§Examples

Basic usage:

assert_eq!(uint!(0).checked_pow(2), Some(uint!(0)));
assert_eq!(uint!(8).checked_pow(2), Some(uint!(64)));
assert_eq!(uint!(1_000_000_000u32).checked_pow(2), None);
assert_eq!(UInt::MAX.checked_pow(2), None);
Source

pub fn saturating_add(self, rhs: UInt) -> UInt

Saturating integer addition. Computes self + rhs, saturating at the numeric bounds instead of overflowing.

§Examples

Basic usage:

assert_eq!(uint!(100).saturating_add(uint!(1)), uint!(101));
assert_eq!(UInt::MAX.saturating_add(uint!(1)), UInt::MAX);
Source

pub fn saturating_sub(self, rhs: UInt) -> UInt

Saturating integer subtraction. Computes self - rhs, saturating at the numeric bounds instead of underflowing.

§Examples

Basic usage:

assert_eq!(uint!(100).saturating_sub(uint!(1)), uint!(99));
assert_eq!(uint!(1).saturating_sub(uint!(2)), uint!(0));
Source

pub fn saturating_mul(self, rhs: UInt) -> UInt

Saturating integer multiplication. Computes self * rhs, saturating at the numeric bounds instead of overflowing.

§Examples

Basic usage:

assert_eq!(uint!(100).saturating_mul(uint!(2)), uint!(200));
assert_eq!(UInt::MAX.saturating_mul(uint!(2)), UInt::MAX);
assert_eq!(UInt::MAX.saturating_mul(UInt::MAX), UInt::MAX);
Source

pub fn saturating_pow(self, exp: u32) -> UInt

Saturating integer exponentiation. Computes self.pow(exp), saturating at the numeric bounds instead of overflowing or underflowing.

§Examples

Basic usage:

assert_eq!(uint!(5).saturating_pow(2), uint!(25));
assert_eq!(UInt::MAX.saturating_pow(2), UInt::MAX);

Trait Implementations§

Source§

impl Add for UInt

Source§

type Output = UInt

The resulting type after applying the + operator.
Source§

fn add(self, rhs: UInt) -> UInt

Performs the + operation. Read more
Source§

impl AddAssign for UInt

Source§

fn add_assign(&mut self, other: UInt)

Performs the += operation. Read more
Source§

impl Clone for UInt

Source§

fn clone(&self) -> UInt

Returns a copy 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 UInt

Source§

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

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

impl Default for UInt

Source§

fn default() -> UInt

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for UInt

Available on crate feature serde only.
Source§

fn deserialize<D>( deserializer: D, ) -> Result<UInt, <D as Deserializer<'de>>::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for UInt

Source§

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

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

impl Div for UInt

Source§

type Output = UInt

The resulting type after applying the / operator.
Source§

fn div(self, rhs: UInt) -> UInt

Performs the / operation. Read more
Source§

impl DivAssign for UInt

Source§

fn div_assign(&mut self, other: UInt)

Performs the /= operation. Read more
Source§

impl From<UInt> for CanonicalJsonValue

Source§

fn from(value: UInt) -> CanonicalJsonValue

Converts to this type from the input type.
Source§

impl From<UInt> for Int

Source§

fn from(val: UInt) -> Int

Converts to this type from the input type.
Source§

impl From<UInt> for RoomMemberCountIs

Source§

fn from(x: UInt) -> RoomMemberCountIs

Converts to this type from the input type.
Source§

impl From<UInt> for f64

Source§

fn from(val: UInt) -> f64

Converts to this type from the input type.
Source§

impl From<UInt> for i128

Source§

fn from(val: UInt) -> i128

Converts to this type from the input type.
Source§

impl From<UInt> for i64

Source§

fn from(val: UInt) -> i64

Converts to this type from the input type.
Source§

impl From<UInt> for u128

Source§

fn from(val: UInt) -> u128

Converts to this type from the input type.
Source§

impl From<UInt> for u64

Source§

fn from(val: UInt) -> u64

Converts to this type from the input type.
Source§

impl From<u16> for UInt

Source§

fn from(val: u16) -> UInt

Converts to this type from the input type.
Source§

impl From<u32> for UInt

Source§

fn from(val: u32) -> UInt

Converts to this type from the input type.
Source§

impl From<u8> for UInt

Source§

fn from(val: u8) -> UInt

Converts to this type from the input type.
Source§

impl FromStr for UInt

Source§

type Err = ParseIntError

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

fn from_str(src: &str) -> Result<UInt, <UInt as FromStr>::Err>

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

impl Hash for UInt

Source§

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

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 for UInt

Source§

type Output = UInt

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: UInt) -> UInt

Performs the * operation. Read more
Source§

impl MulAssign for UInt

Source§

fn mul_assign(&mut self, other: UInt)

Performs the *= operation. Read more
Source§

impl Ord for UInt

Source§

fn cmp(&self, other: &UInt) -> 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 for UInt

Source§

fn eq(&self, other: &UInt) -> 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 UInt

Source§

fn partial_cmp(&self, other: &UInt) -> 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<'a> Product<&'a UInt> for UInt

Source§

fn product<I>(iter: I) -> UInt
where I: Iterator<Item = &'a UInt>,

Takes an iterator and generates Self from the elements by multiplying the items.
Source§

impl Product for UInt

Source§

fn product<I>(iter: I) -> UInt
where I: Iterator<Item = UInt>,

Takes an iterator and generates Self from the elements by multiplying the items.
Source§

impl RangeBounds<UInt> for RoomMemberCountIs

Source§

fn start_bound(&self) -> Bound<&UInt>

Start index bound. Read more
Source§

fn end_bound(&self) -> Bound<&UInt>

End index bound. Read more
1.35.0 · Source§

fn contains<U>(&self, item: &U) -> bool
where T: PartialOrd<U>, U: PartialOrd<T> + ?Sized,

Returns true if item is contained in the range. Read more
Source§

impl Rem for UInt

Source§

type Output = UInt

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: UInt) -> UInt

Performs the % operation. Read more
Source§

impl RemAssign for UInt

Source§

fn rem_assign(&mut self, other: UInt)

Performs the %= operation. Read more
Source§

impl Serialize for UInt

Source§

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
Source§

impl Sub for UInt

Source§

type Output = UInt

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: UInt) -> UInt

Performs the - operation. Read more
Source§

impl SubAssign for UInt

Source§

fn sub_assign(&mut self, other: UInt)

Performs the -= operation. Read more
Source§

impl<'a> Sum<&'a UInt> for UInt

Source§

fn sum<I>(iter: I) -> UInt
where I: Iterator<Item = &'a UInt>,

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl Sum for UInt

Source§

fn sum<I>(iter: I) -> UInt
where I: Iterator<Item = UInt>,

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl TryFrom<UInt> for VoipVersionId

Source§

type Error = Error

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

fn try_from( u: UInt, ) -> Result<VoipVersionId, <VoipVersionId as TryFrom<UInt>>::Error>

Performs the conversion.
Source§

impl TryFrom<UInt> for i16

Source§

type Error = TryFromIntError

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

fn try_from(val: UInt) -> Result<i16, TryFromIntError>

Performs the conversion.
Source§

impl TryFrom<UInt> for i32

Source§

type Error = TryFromIntError

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

fn try_from(val: UInt) -> Result<i32, TryFromIntError>

Performs the conversion.
Source§

impl TryFrom<UInt> for i8

Source§

type Error = TryFromIntError

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

fn try_from(val: UInt) -> Result<i8, TryFromIntError>

Performs the conversion.
Source§

impl TryFrom<UInt> for isize

Source§

type Error = TryFromIntError

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

fn try_from(val: UInt) -> Result<isize, TryFromIntError>

Performs the conversion.
Source§

impl TryFrom<UInt> for u16

Source§

type Error = TryFromIntError

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

fn try_from(val: UInt) -> Result<u16, TryFromIntError>

Performs the conversion.
Source§

impl TryFrom<UInt> for u32

Source§

type Error = TryFromIntError

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

fn try_from(val: UInt) -> Result<u32, TryFromIntError>

Performs the conversion.
Source§

impl TryFrom<UInt> for u8

Source§

type Error = TryFromIntError

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

fn try_from(val: UInt) -> Result<u8, TryFromIntError>

Performs the conversion.
Source§

impl TryFrom<UInt> for usize

Source§

type Error = TryFromIntError

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

fn try_from(val: UInt) -> Result<usize, TryFromIntError>

Performs the conversion.
Source§

impl TryFrom<i128> for UInt

Source§

type Error = TryFromIntError

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

fn try_from(val: i128) -> Result<UInt, TryFromIntError>

Performs the conversion.
Source§

impl TryFrom<i16> for UInt

Source§

type Error = TryFromIntError

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

fn try_from(val: i16) -> Result<UInt, TryFromIntError>

Performs the conversion.
Source§

impl TryFrom<i32> for UInt

Source§

type Error = TryFromIntError

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

fn try_from(val: i32) -> Result<UInt, TryFromIntError>

Performs the conversion.
Source§

impl TryFrom<i64> for UInt

Source§

type Error = TryFromIntError

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

fn try_from(val: i64) -> Result<UInt, TryFromIntError>

Performs the conversion.
Source§

impl TryFrom<i8> for UInt

Source§

type Error = TryFromIntError

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

fn try_from(val: i8) -> Result<UInt, TryFromIntError>

Performs the conversion.
Source§

impl TryFrom<isize> for UInt

Source§

type Error = TryFromIntError

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

fn try_from(val: isize) -> Result<UInt, TryFromIntError>

Performs the conversion.
Source§

impl TryFrom<u128> for UInt

Source§

type Error = TryFromIntError

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

fn try_from(val: u128) -> Result<UInt, TryFromIntError>

Performs the conversion.
Source§

impl TryFrom<u64> for UInt

Source§

type Error = TryFromIntError

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

fn try_from(val: u64) -> Result<UInt, TryFromIntError>

Performs the conversion.
Source§

impl TryFrom<usize> for UInt

Source§

type Error = TryFromIntError

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

fn try_from(val: usize) -> Result<UInt, TryFromIntError>

Performs the conversion.
Source§

impl Copy for UInt

Source§

impl Eq for UInt

Source§

impl StructuralPartialEq for UInt

Auto Trait Implementations§

§

impl Freeze for UInt

§

impl RefUnwindSafe for UInt

§

impl Send for UInt

§

impl Sync for UInt

§

impl Unpin for UInt

§

impl UnwindSafe for UInt

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, dst: *mut u8)

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

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
§

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

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

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

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

Compare self to key and return true if they are equal.
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> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> FutureExt for T

Source§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
Source§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
Source§

impl<T, UT> HandleAlloc<UT> for T
where T: Send + Sync,

Source§

fn new_handle(value: Arc<T>) -> Handle

Create a new handle for an Arc value Read more
Source§

fn clone_handle(handle: Handle) -> Handle

Clone a handle Read more
Source§

fn consume_handle(handle: Handle) -> Arc<T>

Consume a handle, getting back the initial Arc<>
Source§

fn get_arc(handle: Handle) -> Arc<Self>

Get a clone of the Arc<> using a “borrowed” handle. Read more
Source§

impl<T, W> HasTypeWitness<W> for T
where W: MakeTypeWitness<Arg = T>, T: ?Sized,

Source§

const WITNESS: W = W::MAKE

A constant of the type witness
Source§

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

Source§

const TYPE_EQ: TypeEq<T, <T as Identity>::Type> = TypeEq::NEW

Proof that Self is the same type as Self::Type, provides methods for casting between Self and Self::Type.
Source§

type Type = T

The same type as Self, used to emulate type equality bounds (T == U) with associated type equality constraints (T: Identity<Type = U>).
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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§

default 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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> Any for T
where T: Any,

Source§

impl<T> AsyncTraitDeps for T

Source§

impl<T> CloneAny for T
where T: Any + Clone,

Source§

impl<T> CloneAnySend for T
where T: Any + Send + Clone,

Source§

impl<T> CloneAnySendSync for T
where T: Any + Send + Sync + Clone,

Source§

impl<T> CloneAnySync for T
where T: Any + Sync + Clone,

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T, Rhs, Output> GroupOps<Rhs, Output> for T
where T: Add<Rhs, Output = Output> + Sub<Rhs, Output = Output> + AddAssign<Rhs> + SubAssign<Rhs>,

Source§

impl<T> MaybeSendSync for T

Source§

impl<T, Rhs> NumAssignOps<Rhs> for T
where T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,

Source§

impl<T, Rhs, Output> NumOps<Rhs, Output> for T
where T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,

Source§

impl<T, Rhs, Output> ScalarMul<Rhs, Output> for T
where T: Mul<Rhs, Output = Output> + MulAssign<Rhs>,

Source§

impl<T> SendOutsideWasm for T
where T: Send,

Source§

impl<T> SyncOutsideWasm for T
where T: Sync,