Struct Integer
pub struct Integer(/* private fields */);Available on crate feature
backend-rug only.Expand description
Big integer type used in this crate
Implementations§
§impl Integer
impl Integer
pub fn to_bytes_lsf(&self) -> Vec<u8> ⓘ
pub fn to_bytes_lsf(&self) -> Vec<u8> ⓘ
Converts to bytes, with bytes representing least significant base256 digits appearing first. Discards the sign
§Example
let x = Integer::from(0x11223344);
assert_eq!(x.to_bytes_lsf(), vec![0x44, 0x33, 0x22, 0x11]);pub fn to_bytes_msf(&self) -> Vec<u8> ⓘ
pub fn to_bytes_msf(&self) -> Vec<u8> ⓘ
Converts to bytes, with bytes representing most significant base256 digits appearing first. Discards the sign
§Example
let x = Integer::from(0x11223344);
assert_eq!(x.to_bytes_msf(), vec![0x11, 0x22, 0x33, 0x44]);pub fn to_bytes_msf_signed(&self) -> (Vec<u8>, Sign)
pub fn to_bytes_msf_signed(&self) -> (Vec<u8>, Sign)
Converts to bytes, with bytes representing most significant base256 digits appearing first
§Example
let x = Integer::from(-0x11223344);
assert_eq!(x.to_bytes_msf_signed(), (vec![0x11, 0x22, 0x33, 0x44],
Sign::Negative));pub fn from_bytes_msf(bytes: &[u8]) -> Integer
pub fn from_bytes_msf(bytes: &[u8]) -> Integer
Converts bytes to Integer. Inverse of Integer::to_bytes_msf
pub fn from_bytes_msf_signed(bytes: &[u8], sign: Sign) -> Integer
pub fn from_bytes_msf_signed(bytes: &[u8], sign: Sign) -> Integer
Converts bytes to Integer. Inverse of Integer::to_bytes_msf_signed
pub fn to_str_radix(&self, radix: u16) -> String
pub fn to_str_radix(&self, radix: u16) -> String
Returns a string representation of the number for the specified radix
pub fn from_str_radix(s: &str, radix: u16) -> Option<Integer>
pub fn from_str_radix(s: &str, radix: u16) -> Option<Integer>
Parses the integer using the given radix
§impl Integer
impl Integer
pub fn one() -> Integer
pub fn zero() -> Integer
pub fn is_one(&self) -> bool
pub fn is_even(&self) -> bool
pub fn abs(self) -> Integer
pub fn cmp_abs(&self, other: &Integer) -> Ordering
pub fn lcm_ref(&self, other: &Integer) -> Integer
pub fn gcd_ref(&self, other: &Integer) -> Integer
pub fn cmp0(&self) -> Ordering
pub fn sign(&self) -> Sign
pub fn pow_mod(self, exponent: &Integer, modulo: &Integer) -> Option<Integer>
pub fn pow_mod_ref( &self, exponent: &Integer, modulo: &Integer, ) -> Option<Integer>
pub fn u_pow_u(base: u32, exponent: u32) -> Integer
pub fn square(self) -> Integer
pub fn square_ref(&self) -> Integer
pub fn sqrt(self) -> Option<Integer>
pub fn sqrt_ref(&self) -> Option<Integer>
pub fn modulo(self, divisor: &Integer) -> Integer
pub fn modulo_ref(&self, divisor: &Integer) -> Integer
pub fn modulo_mut(&mut self, divisor: &Integer) -> &mut Integer
pub fn mod_u(&self, modulo: u32) -> u32
pub fn significant_bits(&self) -> u64
pub fn significant_dwords(&self) -> usize
pub fn invert(self, modulo: &Integer) -> Option<Integer>
pub fn invert_ref(&self, modulo: &Integer) -> Option<Integer>
pub fn set_bit(&mut self, index: u32, value: bool) -> &mut Integer
pub fn random_below(self, rng: &mut impl RngCore) -> Integer
pub fn random_below_ref(&self, rng: &mut impl RngCore) -> Integer
pub fn random_bits(bits: u32, rng: &mut impl RngCore) -> Integer
pub fn random_bits_signed(bits: u32, rng: &mut impl RngCore) -> Integer
pub fn assign_random_below( &mut self, modulo: &Integer, rng: &mut impl RngCore, ) -> &mut Integer
pub fn assign_random_bits( &mut self, bits: u32, rng: &mut impl RngCore, ) -> &mut Integer
pub fn is_probably_prime(&self, reps: u32, _rng: &mut impl RngCore) -> IsPrime
pub fn generate_prime(rng: &mut impl RngCore, bit_size: u32) -> Integer
pub fn jacobi(&self, n: &Integer) -> i32
Trait Implementations§
§impl AddAssign<&Integer> for Integer
impl AddAssign<&Integer> for Integer
§fn add_assign(&mut self, rhs: &Integer)
fn add_assign(&mut self, rhs: &Integer)
Performs the
+= operation. Read more§impl AddAssign<i16> for Integer
impl AddAssign<i16> for Integer
§fn add_assign(&mut self, rhs: i16)
fn add_assign(&mut self, rhs: i16)
Performs the
+= operation. Read more§impl AddAssign<i32> for Integer
impl AddAssign<i32> for Integer
§fn add_assign(&mut self, rhs: i32)
fn add_assign(&mut self, rhs: i32)
Performs the
+= operation. Read more§impl AddAssign<i64> for Integer
impl AddAssign<i64> for Integer
§fn add_assign(&mut self, rhs: i64)
fn add_assign(&mut self, rhs: i64)
Performs the
+= operation. Read more§impl AddAssign<i8> for Integer
impl AddAssign<i8> for Integer
§fn add_assign(&mut self, rhs: i8)
fn add_assign(&mut self, rhs: i8)
Performs the
+= operation. Read more§impl AddAssign<isize> for Integer
impl AddAssign<isize> for Integer
§fn add_assign(&mut self, rhs: isize)
fn add_assign(&mut self, rhs: isize)
Performs the
+= operation. Read more§impl AddAssign<u16> for Integer
impl AddAssign<u16> for Integer
§fn add_assign(&mut self, rhs: u16)
fn add_assign(&mut self, rhs: u16)
Performs the
+= operation. Read more§impl AddAssign<u32> for Integer
impl AddAssign<u32> for Integer
§fn add_assign(&mut self, rhs: u32)
fn add_assign(&mut self, rhs: u32)
Performs the
+= operation. Read more§impl AddAssign<u64> for Integer
impl AddAssign<u64> for Integer
§fn add_assign(&mut self, rhs: u64)
fn add_assign(&mut self, rhs: u64)
Performs the
+= operation. Read more§impl AddAssign<u8> for Integer
impl AddAssign<u8> for Integer
§fn add_assign(&mut self, rhs: u8)
fn add_assign(&mut self, rhs: u8)
Performs the
+= operation. Read more§impl AddAssign<usize> for Integer
impl AddAssign<usize> for Integer
§fn add_assign(&mut self, rhs: usize)
fn add_assign(&mut self, rhs: usize)
Performs the
+= operation. Read more§impl AddAssign for Integer
impl AddAssign for Integer
§fn add_assign(&mut self, rhs: Integer)
fn add_assign(&mut self, rhs: Integer)
Performs the
+= operation. Read more§impl BitAndAssign<u32> for Integer
impl BitAndAssign<u32> for Integer
§fn bitand_assign(&mut self, rhs: u32)
fn bitand_assign(&mut self, rhs: u32)
Performs the
&= operation. Read more§impl BitOrAssign<u32> for Integer
impl BitOrAssign<u32> for Integer
§fn bitor_assign(&mut self, rhs: u32)
fn bitor_assign(&mut self, rhs: u32)
Performs the
|= operation. Read more§impl<'de> Deserialize<'de> for Integer
impl<'de> Deserialize<'de> for Integer
§fn deserialize<D>(
deserializer: D,
) -> Result<Integer, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<Integer, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl DivAssign<&Integer> for Integer
impl DivAssign<&Integer> for Integer
§fn div_assign(&mut self, rhs: &Integer)
fn div_assign(&mut self, rhs: &Integer)
Performs the
/= operation. Read more§impl DivAssign<i16> for Integer
impl DivAssign<i16> for Integer
§fn div_assign(&mut self, rhs: i16)
fn div_assign(&mut self, rhs: i16)
Performs the
/= operation. Read more§impl DivAssign<i32> for Integer
impl DivAssign<i32> for Integer
§fn div_assign(&mut self, rhs: i32)
fn div_assign(&mut self, rhs: i32)
Performs the
/= operation. Read more§impl DivAssign<i64> for Integer
impl DivAssign<i64> for Integer
§fn div_assign(&mut self, rhs: i64)
fn div_assign(&mut self, rhs: i64)
Performs the
/= operation. Read more§impl DivAssign<i8> for Integer
impl DivAssign<i8> for Integer
§fn div_assign(&mut self, rhs: i8)
fn div_assign(&mut self, rhs: i8)
Performs the
/= operation. Read more§impl DivAssign<isize> for Integer
impl DivAssign<isize> for Integer
§fn div_assign(&mut self, rhs: isize)
fn div_assign(&mut self, rhs: isize)
Performs the
/= operation. Read more§impl DivAssign<u16> for Integer
impl DivAssign<u16> for Integer
§fn div_assign(&mut self, rhs: u16)
fn div_assign(&mut self, rhs: u16)
Performs the
/= operation. Read more§impl DivAssign<u32> for Integer
impl DivAssign<u32> for Integer
§fn div_assign(&mut self, rhs: u32)
fn div_assign(&mut self, rhs: u32)
Performs the
/= operation. Read more§impl DivAssign<u64> for Integer
impl DivAssign<u64> for Integer
§fn div_assign(&mut self, rhs: u64)
fn div_assign(&mut self, rhs: u64)
Performs the
/= operation. Read more§impl DivAssign<u8> for Integer
impl DivAssign<u8> for Integer
§fn div_assign(&mut self, rhs: u8)
fn div_assign(&mut self, rhs: u8)
Performs the
/= operation. Read more§impl DivAssign<usize> for Integer
impl DivAssign<usize> for Integer
§fn div_assign(&mut self, rhs: usize)
fn div_assign(&mut self, rhs: usize)
Performs the
/= operation. Read more§impl DivAssign for Integer
impl DivAssign for Integer
§fn div_assign(&mut self, rhs: Integer)
fn div_assign(&mut self, rhs: Integer)
Performs the
/= operation. Read more§impl MulAssign<&Integer> for Integer
impl MulAssign<&Integer> for Integer
§fn mul_assign(&mut self, rhs: &Integer)
fn mul_assign(&mut self, rhs: &Integer)
Performs the
*= operation. Read more§impl MulAssign<i16> for Integer
impl MulAssign<i16> for Integer
§fn mul_assign(&mut self, rhs: i16)
fn mul_assign(&mut self, rhs: i16)
Performs the
*= operation. Read more§impl MulAssign<i32> for Integer
impl MulAssign<i32> for Integer
§fn mul_assign(&mut self, rhs: i32)
fn mul_assign(&mut self, rhs: i32)
Performs the
*= operation. Read more§impl MulAssign<i64> for Integer
impl MulAssign<i64> for Integer
§fn mul_assign(&mut self, rhs: i64)
fn mul_assign(&mut self, rhs: i64)
Performs the
*= operation. Read more§impl MulAssign<i8> for Integer
impl MulAssign<i8> for Integer
§fn mul_assign(&mut self, rhs: i8)
fn mul_assign(&mut self, rhs: i8)
Performs the
*= operation. Read more§impl MulAssign<isize> for Integer
impl MulAssign<isize> for Integer
§fn mul_assign(&mut self, rhs: isize)
fn mul_assign(&mut self, rhs: isize)
Performs the
*= operation. Read more§impl MulAssign<u16> for Integer
impl MulAssign<u16> for Integer
§fn mul_assign(&mut self, rhs: u16)
fn mul_assign(&mut self, rhs: u16)
Performs the
*= operation. Read more§impl MulAssign<u32> for Integer
impl MulAssign<u32> for Integer
§fn mul_assign(&mut self, rhs: u32)
fn mul_assign(&mut self, rhs: u32)
Performs the
*= operation. Read more§impl MulAssign<u64> for Integer
impl MulAssign<u64> for Integer
§fn mul_assign(&mut self, rhs: u64)
fn mul_assign(&mut self, rhs: u64)
Performs the
*= operation. Read more§impl MulAssign<u8> for Integer
impl MulAssign<u8> for Integer
§fn mul_assign(&mut self, rhs: u8)
fn mul_assign(&mut self, rhs: u8)
Performs the
*= operation. Read more§impl MulAssign<usize> for Integer
impl MulAssign<usize> for Integer
§fn mul_assign(&mut self, rhs: usize)
fn mul_assign(&mut self, rhs: usize)
Performs the
*= operation. Read more§impl MulAssign for Integer
impl MulAssign for Integer
§fn mul_assign(&mut self, rhs: Integer)
fn mul_assign(&mut self, rhs: Integer)
Performs the
*= operation. Read more§impl Ord for Integer
impl Ord for Integer
§impl PartialOrd for Integer
impl PartialOrd for Integer
§impl RemAssign<&Integer> for Integer
impl RemAssign<&Integer> for Integer
§fn rem_assign(&mut self, rhs: &Integer)
fn rem_assign(&mut self, rhs: &Integer)
Performs the
%= operation. Read more§impl RemAssign<i16> for Integer
impl RemAssign<i16> for Integer
§fn rem_assign(&mut self, rhs: i16)
fn rem_assign(&mut self, rhs: i16)
Performs the
%= operation. Read more§impl RemAssign<i32> for Integer
impl RemAssign<i32> for Integer
§fn rem_assign(&mut self, rhs: i32)
fn rem_assign(&mut self, rhs: i32)
Performs the
%= operation. Read more§impl RemAssign<i64> for Integer
impl RemAssign<i64> for Integer
§fn rem_assign(&mut self, rhs: i64)
fn rem_assign(&mut self, rhs: i64)
Performs the
%= operation. Read more§impl RemAssign<i8> for Integer
impl RemAssign<i8> for Integer
§fn rem_assign(&mut self, rhs: i8)
fn rem_assign(&mut self, rhs: i8)
Performs the
%= operation. Read more§impl RemAssign<isize> for Integer
impl RemAssign<isize> for Integer
§fn rem_assign(&mut self, rhs: isize)
fn rem_assign(&mut self, rhs: isize)
Performs the
%= operation. Read more§impl RemAssign<u16> for Integer
impl RemAssign<u16> for Integer
§fn rem_assign(&mut self, rhs: u16)
fn rem_assign(&mut self, rhs: u16)
Performs the
%= operation. Read more§impl RemAssign<u32> for Integer
impl RemAssign<u32> for Integer
§fn rem_assign(&mut self, rhs: u32)
fn rem_assign(&mut self, rhs: u32)
Performs the
%= operation. Read more§impl RemAssign<u64> for Integer
impl RemAssign<u64> for Integer
§fn rem_assign(&mut self, rhs: u64)
fn rem_assign(&mut self, rhs: u64)
Performs the
%= operation. Read more§impl RemAssign<u8> for Integer
impl RemAssign<u8> for Integer
§fn rem_assign(&mut self, rhs: u8)
fn rem_assign(&mut self, rhs: u8)
Performs the
%= operation. Read more§impl RemAssign<usize> for Integer
impl RemAssign<usize> for Integer
§fn rem_assign(&mut self, rhs: usize)
fn rem_assign(&mut self, rhs: usize)
Performs the
%= operation. Read more§impl RemAssign for Integer
impl RemAssign for Integer
§fn rem_assign(&mut self, rhs: Integer)
fn rem_assign(&mut self, rhs: Integer)
Performs the
%= operation. Read more§impl Serialize for Integer
impl Serialize for Integer
§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
§impl ShlAssign<u32> for Integer
impl ShlAssign<u32> for Integer
§fn shl_assign(&mut self, rhs: u32)
fn shl_assign(&mut self, rhs: u32)
Performs the
<<= operation. Read more§impl ShrAssign<u32> for Integer
impl ShrAssign<u32> for Integer
§fn shr_assign(&mut self, rhs: u32)
fn shr_assign(&mut self, rhs: u32)
Performs the
>>= operation. Read more§impl SubAssign<&Integer> for Integer
impl SubAssign<&Integer> for Integer
§fn sub_assign(&mut self, rhs: &Integer)
fn sub_assign(&mut self, rhs: &Integer)
Performs the
-= operation. Read more§impl SubAssign<i16> for Integer
impl SubAssign<i16> for Integer
§fn sub_assign(&mut self, rhs: i16)
fn sub_assign(&mut self, rhs: i16)
Performs the
-= operation. Read more§impl SubAssign<i32> for Integer
impl SubAssign<i32> for Integer
§fn sub_assign(&mut self, rhs: i32)
fn sub_assign(&mut self, rhs: i32)
Performs the
-= operation. Read more§impl SubAssign<i64> for Integer
impl SubAssign<i64> for Integer
§fn sub_assign(&mut self, rhs: i64)
fn sub_assign(&mut self, rhs: i64)
Performs the
-= operation. Read more§impl SubAssign<i8> for Integer
impl SubAssign<i8> for Integer
§fn sub_assign(&mut self, rhs: i8)
fn sub_assign(&mut self, rhs: i8)
Performs the
-= operation. Read more§impl SubAssign<isize> for Integer
impl SubAssign<isize> for Integer
§fn sub_assign(&mut self, rhs: isize)
fn sub_assign(&mut self, rhs: isize)
Performs the
-= operation. Read more§impl SubAssign<u16> for Integer
impl SubAssign<u16> for Integer
§fn sub_assign(&mut self, rhs: u16)
fn sub_assign(&mut self, rhs: u16)
Performs the
-= operation. Read more§impl SubAssign<u32> for Integer
impl SubAssign<u32> for Integer
§fn sub_assign(&mut self, rhs: u32)
fn sub_assign(&mut self, rhs: u32)
Performs the
-= operation. Read more§impl SubAssign<u64> for Integer
impl SubAssign<u64> for Integer
§fn sub_assign(&mut self, rhs: u64)
fn sub_assign(&mut self, rhs: u64)
Performs the
-= operation. Read more§impl SubAssign<u8> for Integer
impl SubAssign<u8> for Integer
§fn sub_assign(&mut self, rhs: u8)
fn sub_assign(&mut self, rhs: u8)
Performs the
-= operation. Read more§impl SubAssign<usize> for Integer
impl SubAssign<usize> for Integer
§fn sub_assign(&mut self, rhs: usize)
fn sub_assign(&mut self, rhs: usize)
Performs the
-= operation. Read more§impl SubAssign for Integer
impl SubAssign for Integer
§fn sub_assign(&mut self, rhs: Integer)
fn sub_assign(&mut self, rhs: Integer)
Performs the
-= operation. Read moreimpl Eq for Integer
impl StructuralPartialEq for Integer
Auto Trait Implementations§
impl Freeze for Integer
impl RefUnwindSafe for Integer
impl Send for Integer
impl Sync for Integer
impl Unpin for Integer
impl UnsafeUnpin for Integer
impl UnwindSafe for Integer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
Causes
self to use its Binary implementation when Debug-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
Causes
self to use its Display implementation when
Debug-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
Causes
self to use its LowerExp implementation when
Debug-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
Causes
self to use its LowerHex implementation when
Debug-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
Causes
self to use its Octal implementation when Debug-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
Causes
self to use its Pointer implementation when
Debug-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
Causes
self to use its UpperExp implementation when
Debug-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
Causes
self to use its UpperHex implementation when
Debug-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
Formats each item in a sequence. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Pipes by value. This is generally the method you want to use. Read more
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
Borrows
self and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
Mutably borrows
self and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
Borrows
self, then passes self.as_ref() into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
Mutably borrows
self, then passes self.as_mut() into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
Borrows
self, then passes self.deref() into the pipe function.Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Immutable access to the
Borrow<B> of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
Mutable access to the
BorrowMut<B> of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
Immutable access to the
AsRef<R> view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
Mutable access to the
AsMut<R> view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Immutable access to the
Deref::Target of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Mutable access to the
Deref::Target of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
Calls
.tap() only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
Calls
.tap_mut() only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
Calls
.tap_borrow() only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
Calls
.tap_borrow_mut() only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
Calls
.tap_ref() only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
Calls
.tap_ref_mut() only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
Calls
.tap_deref() only in debug builds, and is erased in release
builds.§impl<T> TryConv for T
impl<T> TryConv for T
Source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
Source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
Source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
Source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
Source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
Source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.