Struct matrix_sdk_base::ruma::Int

source ·
pub struct Int(/* private fields */);
Expand description

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

Implementations§

source§

impl Int

source

pub const MIN: Int = _

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

§Examples

Basic usage:

assert_eq!(Int::MIN, Int::try_from(-9_007_199_254_740_991i64).unwrap());
source

pub const MAX: Int = _

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

§Examples

Basic usage:

assert_eq!(Int::MAX, Int::try_from(9_007_199_254_740_991i64).unwrap());
source

pub fn new(val: i64) -> Option<Int>

Try to create an Int from the provided i64, returning None if it is smaller than MIN_SAFE_INT or larger than MAX_SAFE_INT.

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

§Examples

Basic usage:

assert_eq!(Int::new(js_int::MIN_SAFE_INT), Some(Int::MIN));
assert_eq!(Int::new(js_int::MAX_SAFE_INT), Some(Int::MAX));
assert_eq!(Int::new(js_int::MIN_SAFE_INT - 1), None);
assert_eq!(Int::new(js_int::MAX_SAFE_INT + 1), None);
source

pub fn new_saturating(val: i64) -> Int

Creates an Int from the given i64 clamped to the safe interval.

The given value gets clamped into the closed interval between MIN_SAFE_INT and MAX_SAFE_INT.

§Examples

Basic usage:

assert_eq!(Int::new_saturating(0), int!(0));
assert_eq!(Int::new_saturating(js_int::MAX_SAFE_INT), Int::MAX);
assert_eq!(Int::new_saturating(js_int::MAX_SAFE_INT + 1), Int::MAX);
assert_eq!(Int::new_saturating(js_int::MIN_SAFE_INT), Int::MIN);
assert_eq!(Int::new_saturating(js_int::MIN_SAFE_INT - 1), Int::MIN);
source

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

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

The string is expected to be an optional + or - 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!(Int::from_str_radix("A", 16), Ok(int!(10)));
source

pub const fn min_value() -> Int

👎Deprecated: Use UInt::MIN instead.

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

§Examples

Basic usage:

assert_eq!(Int::min_value(), Int::try_from(-9_007_199_254_740_991i64).unwrap());
source

pub const fn max_value() -> Int

👎Deprecated: Use Int::MAX instead.

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

§Examples

Basic usage:

assert_eq!(Int::max_value(), Int::try_from(9_007_199_254_740_991i64).unwrap());
source

pub fn abs(self) -> Int

Computes the absolute value of self.

§Examples

Basic usage:

assert_eq!(int!(10).abs(), int!(10));
assert_eq!(int!(-10).abs(), int!(10));

// Differently from i8 / i16 / i32 / i128, Int's min_value is its max_value negated
assert_eq!(Int::MIN.abs(), Int::MAX);
source

pub const fn is_positive(self) -> bool

Returns true if self is positive and false if the number is zero or negative.

§Examples

Basic usage:

assert!(int!(10).is_positive());
assert!(!int!(0).is_positive());
assert!(!int!(-10).is_positive());
source

pub const fn is_negative(self) -> bool

Returns true if self is negative and false if the number is zero or positive.

§Examples

Basic usage:

assert!(int!(-10).is_negative());
assert!(!int!(0).is_negative());
assert!(!int!(10).is_negative());
source

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

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

§Examples

Basic usage:

assert_eq!(
    (Int::MAX - int!(1)).checked_add(int!(1)),
    Some(Int::MAX)
);
assert_eq!((Int::MAX - int!(1)).checked_add(int!(2)), None);
source

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

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

§Examples

Basic usage:

assert_eq!(
    (Int::MIN + int!(2)).checked_sub(int!(1)),
    Some(Int::MIN + int!(1))
);
assert_eq!((Int::MIN + int!(2)).checked_sub(int!(3)), None);
source

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

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

§Examples

Basic usage:

assert_eq!(int!(5).checked_mul(int!(1)), Some(int!(5)));
assert_eq!(Int::MAX.checked_mul(int!(2)), None);
source

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

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

§Examples

Basic usage:

assert_eq!(Int::MIN.checked_div(int!(-1)), Some(Int::MAX));
assert_eq!(int!(1).checked_div(int!(0)), None);
source

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

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

§Examples

Basic usage:

assert_eq!(int!(5).checked_rem(int!(2)), Some(int!(1)));
assert_eq!(int!(5).checked_rem(int!(0)), None);
assert_eq!(Int::MIN.checked_rem(int!(-1)), Some(int!(0)));
source

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

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

§Examples

Basic usage:

assert_eq!(int!(8).checked_pow(2), Some(int!(64)));
assert_eq!(Int::MAX.checked_pow(2), None);
assert_eq!(Int::MIN.checked_pow(2), None);
assert_eq!(int!(1_000_000_000).checked_pow(2), None);
source

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

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

§Examples

Basic usage:

assert_eq!(int!(100).saturating_add(int!(1)), int!(101));
assert_eq!(Int::MAX.saturating_add(int!(1)), Int::MAX);
assert_eq!(Int::MIN.saturating_add(int!(-1)), Int::MIN);
source

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

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

§Examples

Basic usage:

assert_eq!(int!(100).saturating_sub(int!(1)), int!(99));
assert_eq!(Int::MIN.saturating_sub(int!(1)), Int::MIN);
assert_eq!(Int::MAX.saturating_sub(int!(-1)), Int::MAX);
source

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

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

§Examples

Basic usage:

assert_eq!(int!(100).saturating_mul(int!(2)), int!(200));
assert_eq!(Int::MAX.saturating_mul(int!(2)), Int::MAX);
assert_eq!(Int::MAX.saturating_mul(Int::MAX), Int::MAX);
assert_eq!(Int::MAX.saturating_mul(Int::MIN), Int::MIN);
source

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

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

§Examples

Basic usage:

assert_eq!(int!(5).saturating_pow(2), int!(25));
assert_eq!(int!(-2).saturating_pow(3), int!(-8));
assert_eq!(Int::MAX.saturating_pow(2), Int::MAX);
assert_eq!(Int::MIN.saturating_pow(2), Int::MAX);

Trait Implementations§

source§

impl Add for Int

§

type Output = Int

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl AddAssign for Int

source§

fn add_assign(&mut self, other: Int)

Performs the += operation. Read more
source§

impl Clone for Int

source§

fn clone(&self) -> Int

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 Int

source§

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

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

impl Default for Int

source§

fn default() -> Int

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

impl<'de> Deserialize<'de> for Int

Available on crate feature serde only.
source§

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

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

impl Display for Int

source§

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

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

impl Div for Int

§

type Output = Int

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl DivAssign for Int

source§

fn div_assign(&mut self, other: Int)

Performs the /= operation. Read more
source§

impl From<Int> for CanonicalJsonValue

source§

fn from(val: Int) -> CanonicalJsonValue

Converts to this type from the input type.
source§

impl From<Int> for FlattenedJsonValue

source§

fn from(value: Int) -> FlattenedJsonValue

Converts to this type from the input type.
source§

impl From<Int> for ScalarJsonValue

source§

fn from(value: Int) -> ScalarJsonValue

Converts to this type from the input type.
source§

impl From<Int> for f64

source§

fn from(val: Int) -> f64

Converts to this type from the input type.
source§

impl From<Int> for i128

source§

fn from(val: Int) -> i128

Converts to this type from the input type.
source§

impl From<Int> for i64

source§

fn from(val: Int) -> i64

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<i16> for Int

source§

fn from(val: i16) -> Int

Converts to this type from the input type.
source§

impl From<i32> for Int

source§

fn from(val: i32) -> Int

Converts to this type from the input type.
source§

impl From<i8> for Int

source§

fn from(val: i8) -> Int

Converts to this type from the input type.
source§

impl From<u16> for Int

source§

fn from(val: u16) -> Int

Converts to this type from the input type.
source§

impl From<u32> for Int

source§

fn from(val: u32) -> Int

Converts to this type from the input type.
source§

impl From<u8> for Int

source§

fn from(val: u8) -> Int

Converts to this type from the input type.
source§

impl FromStr for Int

§

type Err = ParseIntError

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

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

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

impl Hash for Int

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 Int

§

type Output = Int

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl MulAssign for Int

source§

fn mul_assign(&mut self, other: Int)

Performs the *= operation. Read more
source§

impl Neg for Int

§

type Output = Int

The resulting type after applying the - operator.
source§

fn neg(self) -> Int

Performs the unary - operation. Read more
source§

impl Ord for Int

source§

fn cmp(&self, other: &Int) -> 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 + PartialOrd,

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

impl PartialEq<CanonicalJsonValue> for Int

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<Int> for CanonicalJsonValue

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq for Int

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for Int

source§

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

This method 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

This method 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

This method 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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<'a> Product<&'a Int> for Int

source§

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

Method which takes an iterator and generates Self from the elements by multiplying the items.
source§

impl Product for Int

source§

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

Method which takes an iterator and generates Self from the elements by multiplying the items.
source§

impl Rem for Int

§

type Output = Int

The resulting type after applying the % operator.
source§

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

Performs the % operation. Read more
source§

impl RemAssign for Int

source§

fn rem_assign(&mut self, other: Int)

Performs the %= operation. Read more
source§

impl Serialize for Int

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 Int

§

type Output = Int

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl SubAssign for Int

source§

fn sub_assign(&mut self, other: Int)

Performs the -= operation. Read more
source§

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

source§

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

Method which takes an iterator and generates Self from the elements by “summing up” the items.
source§

impl Sum for Int

source§

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

Method which takes an iterator and generates Self from the elements by “summing up” the items.
source§

impl TryFrom<Int> for i16

§

type Error = TryFromIntError

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

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

Performs the conversion.
source§

impl TryFrom<Int> for i32

§

type Error = TryFromIntError

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

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

Performs the conversion.
source§

impl TryFrom<Int> for i8

§

type Error = TryFromIntError

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

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

Performs the conversion.
source§

impl TryFrom<Int> for isize

§

type Error = TryFromIntError

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

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

Performs the conversion.
source§

impl TryFrom<Int> for u16

§

type Error = TryFromIntError

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

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

Performs the conversion.
source§

impl TryFrom<Int> for u32

§

type Error = TryFromIntError

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

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

Performs the conversion.
source§

impl TryFrom<Int> for u8

§

type Error = TryFromIntError

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

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

Performs the conversion.
source§

impl TryFrom<Int> for usize

§

type Error = TryFromIntError

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

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

Performs the conversion.
source§

impl TryFrom<i128> for Int

§

type Error = TryFromIntError

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

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

Performs the conversion.
source§

impl TryFrom<i64> for Int

§

type Error = TryFromIntError

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

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

Performs the conversion.
source§

impl TryFrom<isize> for Int

§

type Error = TryFromIntError

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

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

Performs the conversion.
source§

impl TryFrom<u128> for Int

§

type Error = TryFromIntError

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

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

Performs the conversion.
source§

impl TryFrom<u64> for Int

§

type Error = TryFromIntError

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

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

Performs the conversion.
source§

impl TryFrom<usize> for Int

§

type Error = TryFromIntError

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

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

Performs the conversion.
source§

impl Copy for Int

source§

impl Eq for Int

source§

impl StructuralPartialEq for Int

Auto Trait Implementations§

§

impl Freeze for Int

§

impl RefUnwindSafe for Int

§

impl Send for Int

§

impl Sync for Int

§

impl Unpin for Int

§

impl UnwindSafe for Int

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§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

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

impl<T> CloneToUninit for T
where T: Copy,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬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<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<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

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,

§

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>).
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.
§

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

§

type Output = T

Should always be Self
source§

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

§

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>,

§

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>,

§

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> AsyncTraitDeps for T

source§

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

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> SendOutsideWasm for T
where T: Send,

source§

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