[−]Struct matrix_sdk::UInt
An integer limited to the range of non-negative integers that can be represented exactly by an f64.
Implementations
impl UInt
pub const MIN: UInt
The smallest value that can be represented by this integer type.
Examples
Basic usage:
assert_eq!(UInt::MIN, uint!(0));
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());
#[must_use]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);
#[must_use]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));
#[must_use]pub const fn min_value() -> UInt
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));
#[must_use]pub const fn max_value() -> UInt
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());
#[must_use]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());
#[must_use]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);
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)));
#[must_use]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);
#[must_use]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);
#[must_use]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);
#[must_use]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);
#[must_use]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);
#[must_use]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);
#[must_use]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);
#[must_use]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);
#[must_use]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));
#[must_use]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);
#[must_use]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
impl Add<UInt> for UInt
type Output = UInt
The resulting type after applying the +
operator.
pub fn add(self, rhs: UInt) -> UInt
impl AddAssign<UInt> for UInt
pub fn add_assign(&mut self, other: UInt)
impl Clone for UInt
pub fn clone(&self) -> UInt
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for UInt
impl Debug for UInt
impl Default for UInt
impl<'de> Deserialize<'de> for UInt
pub fn deserialize<D>(
deserializer: D
) -> Result<UInt, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
deserializer: D
) -> Result<UInt, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
impl Display for UInt
impl Div<UInt> for UInt
type Output = UInt
The resulting type after applying the /
operator.
pub fn div(self, rhs: UInt) -> UInt
impl DivAssign<UInt> for UInt
pub fn div_assign(&mut self, other: UInt)
impl Eq for UInt
impl From<UInt> for i128
impl From<UInt> for u128
impl From<UInt> for u64
impl From<UInt> for Int
impl From<UInt> for f64
impl From<UInt> for i64
impl From<UInt> for RoomMemberCountIs
pub fn from(x: UInt) -> RoomMemberCountIs
impl From<u16> for UInt
impl From<u32> for UInt
impl From<u8> for UInt
impl FromStr for UInt
type Err = ParseIntError
The associated error which can be returned from parsing.
pub fn from_str(src: &str) -> Result<UInt, <UInt as FromStr>::Err>
impl Hash for UInt
pub fn hash<__H>(&self, state: &mut __H) where
__H: Hasher,
__H: Hasher,
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Mul<UInt> for UInt
type Output = UInt
The resulting type after applying the *
operator.
pub fn mul(self, rhs: UInt) -> UInt
impl MulAssign<UInt> for UInt
pub fn mul_assign(&mut self, other: UInt)
impl Ord for UInt
pub fn cmp(&self, other: &UInt) -> Ordering
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<UInt> for UInt
impl PartialOrd<UInt> for UInt
pub fn partial_cmp(&self, other: &UInt) -> Option<Ordering>
pub fn lt(&self, other: &UInt) -> bool
pub fn le(&self, other: &UInt) -> bool
pub fn gt(&self, other: &UInt) -> bool
pub fn ge(&self, other: &UInt) -> bool
impl<'a> Product<&'a UInt> for UInt
impl Product<UInt> for UInt
impl RangeBounds<UInt> for RoomMemberCountIs
pub fn start_bound(&self) -> Bound<&UInt>
pub fn end_bound(&self) -> Bound<&UInt>
pub fn assert_len(self, len: usize) -> Range<usize> where
Self: RangeBounds<usize>,
[src]
Self: RangeBounds<usize>,
pub fn contains<U>(&self, item: &U) -> bool where
T: PartialOrd<U>,
U: PartialOrd<T> + ?Sized,
1.35.0[src]
T: PartialOrd<U>,
U: PartialOrd<T> + ?Sized,
impl Rem<UInt> for UInt
type Output = UInt
The resulting type after applying the %
operator.
pub fn rem(self, rhs: UInt) -> UInt
impl RemAssign<UInt> for UInt
pub fn rem_assign(&mut self, other: UInt)
impl Serialize for UInt
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
impl StructuralEq for UInt
impl StructuralPartialEq for UInt
impl Sub<UInt> for UInt
type Output = UInt
The resulting type after applying the -
operator.
pub fn sub(self, rhs: UInt) -> UInt
impl SubAssign<UInt> for UInt
pub fn sub_assign(&mut self, other: UInt)
impl<'a> Sum<&'a UInt> for UInt
impl Sum<UInt> for UInt
impl TryFrom<UInt> for u16
type Error = TryFromIntError
The type returned in the event of a conversion error.
pub fn try_from(val: UInt) -> Result<u16, TryFromIntError>
impl TryFrom<UInt> for u32
type Error = TryFromIntError
The type returned in the event of a conversion error.
pub fn try_from(val: UInt) -> Result<u32, TryFromIntError>
impl TryFrom<UInt> for u8
type Error = TryFromIntError
The type returned in the event of a conversion error.
pub fn try_from(val: UInt) -> Result<u8, TryFromIntError>
impl TryFrom<i128> for UInt
type Error = TryFromIntError
The type returned in the event of a conversion error.
pub fn try_from(val: i128) -> Result<UInt, TryFromIntError>
impl TryFrom<i16> for UInt
type Error = TryFromIntError
The type returned in the event of a conversion error.
pub fn try_from(val: i16) -> Result<UInt, TryFromIntError>
impl TryFrom<i32> for UInt
type Error = TryFromIntError
The type returned in the event of a conversion error.
pub fn try_from(val: i32) -> Result<UInt, TryFromIntError>
impl TryFrom<i64> for UInt
type Error = TryFromIntError
The type returned in the event of a conversion error.
pub fn try_from(val: i64) -> Result<UInt, TryFromIntError>
impl TryFrom<i8> for UInt
type Error = TryFromIntError
The type returned in the event of a conversion error.
pub fn try_from(val: i8) -> Result<UInt, TryFromIntError>
impl TryFrom<u128> for UInt
type Error = TryFromIntError
The type returned in the event of a conversion error.
pub fn try_from(val: u128) -> Result<UInt, TryFromIntError>
impl TryFrom<u64> for UInt
Auto Trait Implementations
impl RefUnwindSafe for UInt
[src]
impl Send for UInt
[src]
impl Sync for UInt
[src]
impl Unpin for UInt
[src]
impl UnwindSafe for UInt
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> AsyncTraitDeps for T where
T: Send + Sync + Debug,
[src]
T: Send + Sync + Debug,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> CallHasher for T where
T: Hash,
T: Hash,
impl<T> CallHasher for T where
T: Hash + ?Sized,
T: Hash + ?Sized,
impl<T> Conv for T
impl<T> Conv for T
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool
[src]
impl<T> FmtForward for T
pub fn fmt_binary(self) -> FmtBinary<Self> where
Self: Binary,
Self: Binary,
pub fn fmt_display(self) -> FmtDisplay<Self> where
Self: Display,
Self: Display,
pub fn fmt_lower_exp(self) -> FmtLowerExp<Self> where
Self: LowerExp,
Self: LowerExp,
pub fn fmt_lower_hex(self) -> FmtLowerHex<Self> where
Self: LowerHex,
Self: LowerHex,
pub fn fmt_octal(self) -> FmtOctal<Self> where
Self: Octal,
Self: Octal,
pub fn fmt_pointer(self) -> FmtPointer<Self> where
Self: Pointer,
Self: Pointer,
pub fn fmt_upper_exp(self) -> FmtUpperExp<Self> where
Self: UpperExp,
Self: UpperExp,
pub fn fmt_upper_hex(self) -> FmtUpperHex<Self> where
Self: UpperHex,
Self: UpperHex,
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, Rhs> NumAssignOps<Rhs> for T where
T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,
[src]
T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,
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>,
[src]
T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,
impl<T> Pipe for T where
T: ?Sized,
T: ?Sized,
pub fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
pub fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R where
R: 'a,
R: 'a,
pub fn pipe_ref_mut<'a, R>(
&'a mut self,
func: impl FnOnce(&'a mut Self) -> R
) -> R where
R: 'a,
&'a mut self,
func: impl FnOnce(&'a mut Self) -> R
) -> R where
R: 'a,
pub fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R where
Self: Borrow<B>,
R: 'a,
B: 'a + ?Sized,
Self: Borrow<B>,
R: 'a,
B: 'a + ?Sized,
pub fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> R where
Self: BorrowMut<B>,
R: 'a,
B: 'a + ?Sized,
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> R where
Self: BorrowMut<B>,
R: 'a,
B: 'a + ?Sized,
pub fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R where
Self: AsRef<U>,
R: 'a,
U: 'a + ?Sized,
Self: AsRef<U>,
R: 'a,
U: 'a + ?Sized,
pub fn pipe_as_mut<'a, U, R>(
&'a mut self,
func: impl FnOnce(&'a mut U) -> R
) -> R where
Self: AsMut<U>,
R: 'a,
U: 'a + ?Sized,
&'a mut self,
func: impl FnOnce(&'a mut U) -> R
) -> R where
Self: AsMut<U>,
R: 'a,
U: 'a + ?Sized,
pub fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R where
Self: Deref<Target = T>,
R: 'a,
T: 'a + ?Sized,
Self: Deref<Target = T>,
R: 'a,
T: 'a + ?Sized,
pub fn pipe_deref_mut<'a, T, R>(
&'a mut self,
func: impl FnOnce(&'a mut T) -> R
) -> R where
Self: DerefMut<Target = T> + Deref,
R: 'a,
T: 'a + ?Sized,
&'a mut self,
func: impl FnOnce(&'a mut T) -> R
) -> R where
Self: DerefMut<Target = T> + Deref,
R: 'a,
T: 'a + ?Sized,
impl<T> Pipe for T
impl<T> PipeAsRef for T
pub fn pipe_as_ref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R where
Self: AsRef<T>,
R: 'a,
T: 'a,
Self: AsRef<T>,
R: 'a,
T: 'a,
pub fn pipe_as_mut<'a, T, R>(
&'a mut self,
func: impl FnOnce(&'a mut T) -> R
) -> R where
Self: AsMut<T>,
R: 'a,
T: 'a,
&'a mut self,
func: impl FnOnce(&'a mut T) -> R
) -> R where
Self: AsMut<T>,
R: 'a,
T: 'a,
impl<T> PipeBorrow for T
pub fn pipe_borrow<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R where
Self: Borrow<T>,
R: 'a,
T: 'a,
Self: Borrow<T>,
R: 'a,
T: 'a,
pub fn pipe_borrow_mut<'a, T, R>(
&'a mut self,
func: impl FnOnce(&'a mut T) -> R
) -> R where
Self: BorrowMut<T>,
R: 'a,
T: 'a,
&'a mut self,
func: impl FnOnce(&'a mut T) -> R
) -> R where
Self: BorrowMut<T>,
R: 'a,
T: 'a,
impl<T> PipeDeref for T
pub fn pipe_deref<'a, R>(
&'a self,
func: impl FnOnce(&'a Self::Target) -> R
) -> R where
Self: Deref,
R: 'a,
&'a self,
func: impl FnOnce(&'a Self::Target) -> R
) -> R where
Self: Deref,
R: 'a,
pub fn pipe_deref_mut<'a, R>(
&'a mut self,
func: impl FnOnce(&'a mut Self::Target) -> R
) -> R where
Self: DerefMut,
R: 'a,
&'a mut self,
func: impl FnOnce(&'a mut Self::Target) -> R
) -> R where
Self: DerefMut,
R: 'a,
impl<T> PipeRef for T
pub fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R where
R: 'a,
R: 'a,
pub fn pipe_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R where
R: 'a,
R: 'a,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> Tap for T
pub fn tap(self, func: impl FnOnce(&Self)) -> Self
pub fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self
pub fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self where
Self: Borrow<B>,
B: ?Sized,
Self: Borrow<B>,
B: ?Sized,
pub fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self where
Self: BorrowMut<B>,
B: ?Sized,
Self: BorrowMut<B>,
B: ?Sized,
pub fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self where
Self: AsRef<R>,
R: ?Sized,
Self: AsRef<R>,
R: ?Sized,
pub fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self where
Self: AsMut<R>,
R: ?Sized,
Self: AsMut<R>,
R: ?Sized,
pub fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self where
Self: Deref<Target = T>,
T: ?Sized,
Self: Deref<Target = T>,
T: ?Sized,
pub fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self where
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
pub fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
pub fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
pub fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self where
Self: Borrow<B>,
B: ?Sized,
Self: Borrow<B>,
B: ?Sized,
pub fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self where
Self: BorrowMut<B>,
B: ?Sized,
Self: BorrowMut<B>,
B: ?Sized,
pub fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self where
Self: AsRef<R>,
R: ?Sized,
Self: AsRef<R>,
R: ?Sized,
pub fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self where
Self: AsMut<R>,
R: ?Sized,
Self: AsMut<R>,
R: ?Sized,
pub fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self where
Self: Deref<Target = T>,
T: ?Sized,
Self: Deref<Target = T>,
T: ?Sized,
pub fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self where
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
impl<T> Tap for T
pub fn tap<F, R>(self, func: F) -> Self where
F: FnOnce(&Self) -> R,
F: FnOnce(&Self) -> R,
pub fn tap_dbg<F, R>(self, func: F) -> Self where
F: FnOnce(&Self) -> R,
F: FnOnce(&Self) -> R,
pub fn tap_mut<F, R>(self, func: F) -> Self where
F: FnOnce(&mut Self) -> R,
F: FnOnce(&mut Self) -> R,
pub fn tap_mut_dbg<F, R>(self, func: F) -> Self where
F: FnOnce(&mut Self) -> R,
F: FnOnce(&mut Self) -> R,
impl<T, U> TapAsRef<U> for T where
U: ?Sized,
U: ?Sized,
pub fn tap_ref<F, R>(self, func: F) -> Self where
Self: AsRef<T>,
F: FnOnce(&T) -> R,
Self: AsRef<T>,
F: FnOnce(&T) -> R,
pub fn tap_ref_dbg<F, R>(self, func: F) -> Self where
Self: AsRef<T>,
F: FnOnce(&T) -> R,
Self: AsRef<T>,
F: FnOnce(&T) -> R,
pub fn tap_ref_mut<F, R>(self, func: F) -> Self where
Self: AsMut<T>,
F: FnOnce(&mut T) -> R,
Self: AsMut<T>,
F: FnOnce(&mut T) -> R,
pub fn tap_ref_mut_dbg<F, R>(self, func: F) -> Self where
Self: AsMut<T>,
F: FnOnce(&mut T) -> R,
Self: AsMut<T>,
F: FnOnce(&mut T) -> R,
impl<T, U> TapBorrow<U> for T where
U: ?Sized,
U: ?Sized,
pub fn tap_borrow<F, R>(self, func: F) -> Self where
Self: Borrow<T>,
F: FnOnce(&T) -> R,
Self: Borrow<T>,
F: FnOnce(&T) -> R,
pub fn tap_borrow_dbg<F, R>(self, func: F) -> Self where
Self: Borrow<T>,
F: FnOnce(&T) -> R,
Self: Borrow<T>,
F: FnOnce(&T) -> R,
pub fn tap_borrow_mut<F, R>(self, func: F) -> Self where
Self: BorrowMut<T>,
F: FnOnce(&mut T) -> R,
Self: BorrowMut<T>,
F: FnOnce(&mut T) -> R,
pub fn tap_borrow_mut_dbg<F, R>(self, func: F) -> Self where
Self: BorrowMut<T>,
F: FnOnce(&mut T) -> R,
Self: BorrowMut<T>,
F: FnOnce(&mut T) -> R,
impl<T> TapDeref for T
pub fn tap_deref<F, R>(self, func: F) -> Self where
Self: Deref,
F: FnOnce(&Self::Target) -> R,
Self: Deref,
F: FnOnce(&Self::Target) -> R,
pub fn tap_deref_dbg<F, R>(self, func: F) -> Self where
Self: Deref,
F: FnOnce(&Self::Target) -> R,
Self: Deref,
F: FnOnce(&Self::Target) -> R,
pub fn tap_deref_mut<F, R>(self, func: F) -> Self where
Self: DerefMut,
F: FnOnce(&mut Self::Target) -> R,
Self: DerefMut,
F: FnOnce(&mut Self::Target) -> R,
pub fn tap_deref_mut_dbg<F, R>(self, func: F) -> Self where
Self: DerefMut,
F: FnOnce(&mut Self::Target) -> R,
Self: DerefMut,
F: FnOnce(&mut Self::Target) -> R,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> TryConv for T
impl<T> TryConv for T
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> WithSubscriber for T
[src]
pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,