pub struct Mint<T: Integer, R: Reducer<T>>(/* private fields */);
Expand description
Integer with fast modular arithmetics support, based on [MontgomeryInt] under the hood
This struct only designed to be working with this crate. Most binary operators assume that the modulus of two operands (when in montgomery form) are the same, and most implicit conversions between conventional form and montgomery form will be forbidden
Implementations§
Trait Implementations§
source§impl<'a, 'b, T: Integer + Clone + for<'r> Add<&'r T, Output = T>, R: Reducer<T> + Clone> Add<&'b Mint<T, R>> for &'a Mint<T, R>
impl<'a, 'b, T: Integer + Clone + for<'r> Add<&'r T, Output = T>, R: Reducer<T> + Clone> Add<&'b Mint<T, R>> for &'a Mint<T, R>
source§impl<T: Integer + Clone + for<'r> Add<&'r T, Output = T>, R: Reducer<T> + Clone> Add<&Mint<T, R>> for Mint<T, R>
impl<T: Integer + Clone + for<'r> Add<&'r T, Output = T>, R: Reducer<T> + Clone> Add<&Mint<T, R>> for Mint<T, R>
source§impl<'a, 'b, T: Integer + Clone + for<'r> Div<&'r T, Output = T>, R: Reducer<T>> Div<&'b Mint<T, R>> for &'a Mint<T, R>
impl<'a, 'b, T: Integer + Clone + for<'r> Div<&'r T, Output = T>, R: Reducer<T>> Div<&'b Mint<T, R>> for &'a Mint<T, R>
source§impl<T: Integer + Clone + for<'r> Div<&'r T, Output = T>, R: Reducer<T>> Div<&Mint<T, R>> for Mint<T, R>
impl<T: Integer + Clone + for<'r> Div<&'r T, Output = T>, R: Reducer<T>> Div<&Mint<T, R>> for Mint<T, R>
source§impl<T: Integer + Clone + ExactRoots, R: Reducer<T> + Clone> ExactRoots for Mint<T, R>
impl<T: Integer + Clone + ExactRoots, R: Reducer<T> + Clone> ExactRoots for Mint<T, R>
source§impl<T: Integer, R: Reducer<T>> From<ReducedInt<T, R>> for Mint<T, R>
impl<T: Integer, R: Reducer<T>> From<ReducedInt<T, R>> for Mint<T, R>
source§fn from(v: ReducedInt<T, R>) -> Self
fn from(v: ReducedInt<T, R>) -> Self
Converts to this type from the input type.
source§impl<T: Integer + Clone + FromPrimitive, R: Reducer<T>> FromPrimitive for Mint<T, R>
impl<T: Integer + Clone + FromPrimitive, R: Reducer<T>> FromPrimitive for Mint<T, R>
source§fn from_f64(n: f64) -> Option<Self>
fn from_f64(n: f64) -> Option<Self>
Converts a
f64
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read moresource§fn from_i64(n: i64) -> Option<Self>
fn from_i64(n: i64) -> Option<Self>
Converts an
i64
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_u64(n: u64) -> Option<Self>
fn from_u64(n: u64) -> Option<Self>
Converts an
u64
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_isize(n: isize) -> Option<Self>
fn from_isize(n: isize) -> Option<Self>
Converts an
isize
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_i8(n: i8) -> Option<Self>
fn from_i8(n: i8) -> Option<Self>
Converts an
i8
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_i16(n: i16) -> Option<Self>
fn from_i16(n: i16) -> Option<Self>
Converts an
i16
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_i32(n: i32) -> Option<Self>
fn from_i32(n: i32) -> Option<Self>
Converts an
i32
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_i128(n: i128) -> Option<Self>
fn from_i128(n: i128) -> Option<Self>
Converts an
i128
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read moresource§fn from_usize(n: usize) -> Option<Self>
fn from_usize(n: usize) -> Option<Self>
Converts a
usize
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_u8(n: u8) -> Option<Self>
fn from_u8(n: u8) -> Option<Self>
Converts an
u8
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_u16(n: u16) -> Option<Self>
fn from_u16(n: u16) -> Option<Self>
Converts an
u16
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_u32(n: u32) -> Option<Self>
fn from_u32(n: u32) -> Option<Self>
Converts an
u32
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§impl<T: Integer + Clone, R: Reducer<T> + Clone> Integer for Mint<T, R>
impl<T: Integer + Clone, R: Reducer<T> + Clone> Integer for Mint<T, R>
source§fn divides(&self, other: &Self) -> bool
fn divides(&self, other: &Self) -> bool
👎Deprecated: Please use is_multiple_of instead
Deprecated, use
is_multiple_of
instead.source§fn is_multiple_of(&self, other: &Self) -> bool
fn is_multiple_of(&self, other: &Self) -> bool
source§fn div_rem(&self, other: &Self) -> (Self, Self)
fn div_rem(&self, other: &Self) -> (Self, Self)
Simultaneous truncated integer division and modulus.
Returns
(quotient, remainder)
. Read moresource§fn gcd_lcm(&self, other: &Self) -> (Self, Self)
fn gcd_lcm(&self, other: &Self) -> (Self, Self)
Greatest Common Divisor (GCD) and
Lowest Common Multiple (LCM) together. Read more
source§fn extended_gcd(&self, other: &Self) -> ExtendedGcd<Self>where
Self: Clone,
fn extended_gcd(&self, other: &Self) -> ExtendedGcd<Self>where
Self: Clone,
Greatest common divisor and Bézout coefficients. Read more
source§fn div_mod_floor(&self, other: &Self) -> (Self, Self)
fn div_mod_floor(&self, other: &Self) -> (Self, Self)
Simultaneous floored integer division and modulus.
Returns
(quotient, remainder)
. Read moresource§fn next_multiple_of(&self, other: &Self) -> Selfwhere
Self: Clone,
fn next_multiple_of(&self, other: &Self) -> Selfwhere
Self: Clone,
Rounds up to nearest multiple of argument. Read more
source§impl<'a, 'b, T: Integer + Clone, R: Reducer<T> + Clone> ModularCoreOps<&'b Mint<T, R>, &'b Mint<T, R>> for &'a Mint<T, R>
impl<'a, 'b, T: Integer + Clone, R: Reducer<T> + Clone> ModularCoreOps<&'b Mint<T, R>, &'b Mint<T, R>> for &'a Mint<T, R>
source§impl<T: Integer + Clone, R: Reducer<T> + Clone> ModularCoreOps<&Mint<T, R>, &Mint<T, R>> for Mint<T, R>
impl<T: Integer + Clone, R: Reducer<T> + Clone> ModularCoreOps<&Mint<T, R>, &Mint<T, R>> for Mint<T, R>
source§impl<T: Integer + Clone, R: Reducer<T> + Clone> ModularPow<&Mint<T, R>, &Mint<T, R>> for Mint<T, R>
impl<T: Integer + Clone, R: Reducer<T> + Clone> ModularPow<&Mint<T, R>, &Mint<T, R>> for Mint<T, R>
source§impl<T: Integer + Clone + for<'r> ModularSymbols<&'r T>, R: Reducer<T> + Clone> ModularSymbols<&Mint<T, R>> for Mint<T, R>
impl<T: Integer + Clone + for<'r> ModularSymbols<&'r T>, R: Reducer<T> + Clone> ModularSymbols<&Mint<T, R>> for Mint<T, R>
source§impl<'a, 'b, T: Integer + Clone, R: Reducer<T> + Clone> ModularUnaryOps<&'b Mint<T, R>> for &'a Mint<T, R>
impl<'a, 'b, T: Integer + Clone, R: Reducer<T> + Clone> ModularUnaryOps<&'b Mint<T, R>> for &'a Mint<T, R>
source§impl<T: Integer + Clone, R: Reducer<T> + Clone> ModularUnaryOps<&Mint<T, R>> for Mint<T, R>
impl<T: Integer + Clone, R: Reducer<T> + Clone> ModularUnaryOps<&Mint<T, R>> for Mint<T, R>
source§impl<'a, 'b, T: Integer + Clone + for<'r> Mul<&'r T, Output = T>, R: Reducer<T> + Clone> Mul<&'b Mint<T, R>> for &'a Mint<T, R>
impl<'a, 'b, T: Integer + Clone + for<'r> Mul<&'r T, Output = T>, R: Reducer<T> + Clone> Mul<&'b Mint<T, R>> for &'a Mint<T, R>
source§impl<T: Integer + Clone + for<'r> Mul<&'r T, Output = T>, R: Reducer<T> + Clone> Mul<&Mint<T, R>> for Mint<T, R>
impl<T: Integer + Clone + for<'r> Mul<&'r T, Output = T>, R: Reducer<T> + Clone> Mul<&Mint<T, R>> for Mint<T, R>
source§impl<T: Integer + Clone, R: Reducer<T> + Clone> Num for Mint<T, R>
impl<T: Integer + Clone, R: Reducer<T> + Clone> Num for Mint<T, R>
type FromStrRadixErr = <T as Num>::FromStrRadixErr
source§fn from_str_radix(str: &str, radix: u32) -> Result<Self, Self::FromStrRadixErr>
fn from_str_radix(str: &str, radix: u32) -> Result<Self, Self::FromStrRadixErr>
Convert from a string and radix (typically
2..=36
). Read moresource§impl<T: Integer + Clone, R: Reducer<T> + Clone> Ord for Mint<T, R>
impl<T: Integer + Clone, R: Reducer<T> + Clone> Ord for Mint<T, R>
source§impl<T: Integer + Clone, R: Reducer<T>> PartialEq for Mint<T, R>
impl<T: Integer + Clone, R: Reducer<T>> PartialEq for Mint<T, R>
source§impl<T: Integer + Clone, R: Reducer<T> + Clone> PartialOrd for Mint<T, R>
impl<T: Integer + Clone, R: Reducer<T> + Clone> PartialOrd for Mint<T, R>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
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 moresource§impl<'a, 'b, T: Integer + Clone, R: Reducer<T> + Clone> Rem<&'b Mint<T, R>> for &'a Mint<T, R>
impl<'a, 'b, T: Integer + Clone, R: Reducer<T> + Clone> Rem<&'b Mint<T, R>> for &'a Mint<T, R>
source§impl<T: Integer + Clone + Roots, R: Reducer<T> + Clone> Roots for Mint<T, R>
impl<T: Integer + Clone + Roots, R: Reducer<T> + Clone> Roots for Mint<T, R>
source§impl<'a, 'b, T: Integer + Clone + for<'r> Sub<&'r T, Output = T>, R: Reducer<T> + Clone> Sub<&'b Mint<T, R>> for &'a Mint<T, R>
impl<'a, 'b, T: Integer + Clone + for<'r> Sub<&'r T, Output = T>, R: Reducer<T> + Clone> Sub<&'b Mint<T, R>> for &'a Mint<T, R>
source§impl<T: Integer + Clone + for<'r> Sub<&'r T, Output = T>, R: Reducer<T> + Clone> Sub<&Mint<T, R>> for Mint<T, R>
impl<T: Integer + Clone + for<'r> Sub<&'r T, Output = T>, R: Reducer<T> + Clone> Sub<&Mint<T, R>> for Mint<T, R>
source§impl<T: Integer + Clone + ToPrimitive, R: Reducer<T> + Clone> ToPrimitive for Mint<T, R>
impl<T: Integer + Clone + ToPrimitive, R: Reducer<T> + Clone> ToPrimitive for Mint<T, R>
source§fn to_f64(&self) -> Option<f64>
fn to_f64(&self) -> Option<f64>
Converts the value of
self
to an f64
. Overflows may map to positive
or negative inifinity, otherwise None
is returned if the value cannot
be represented by an f64
. Read moresource§fn to_i64(&self) -> Option<i64>
fn to_i64(&self) -> Option<i64>
Converts the value of
self
to an i64
. If the value cannot be
represented by an i64
, then None
is returned.source§fn to_u64(&self) -> Option<u64>
fn to_u64(&self) -> Option<u64>
Converts the value of
self
to a u64
. If the value cannot be
represented by a u64
, then None
is returned.source§fn to_isize(&self) -> Option<isize>
fn to_isize(&self) -> Option<isize>
Converts the value of
self
to an isize
. If the value cannot be
represented by an isize
, then None
is returned.source§fn to_i8(&self) -> Option<i8>
fn to_i8(&self) -> Option<i8>
Converts the value of
self
to an i8
. If the value cannot be
represented by an i8
, then None
is returned.source§fn to_i16(&self) -> Option<i16>
fn to_i16(&self) -> Option<i16>
Converts the value of
self
to an i16
. If the value cannot be
represented by an i16
, then None
is returned.source§fn to_i32(&self) -> Option<i32>
fn to_i32(&self) -> Option<i32>
Converts the value of
self
to an i32
. If the value cannot be
represented by an i32
, then None
is returned.source§fn to_i128(&self) -> Option<i128>
fn to_i128(&self) -> Option<i128>
Converts the value of
self
to an i128
. If the value cannot be
represented by an i128
(i64
under the default implementation), then
None
is returned. Read moresource§fn to_usize(&self) -> Option<usize>
fn to_usize(&self) -> Option<usize>
Converts the value of
self
to a usize
. If the value cannot be
represented by a usize
, then None
is returned.source§fn to_u8(&self) -> Option<u8>
fn to_u8(&self) -> Option<u8>
Converts the value of
self
to a u8
. If the value cannot be
represented by a u8
, then None
is returned.source§fn to_u16(&self) -> Option<u16>
fn to_u16(&self) -> Option<u16>
Converts the value of
self
to a u16
. If the value cannot be
represented by a u16
, then None
is returned.source§fn to_u32(&self) -> Option<u32>
fn to_u32(&self) -> Option<u32>
Converts the value of
self
to a u32
. If the value cannot be
represented by a u32
, then None
is returned.impl<T: Copy + Integer, R: Copy + Reducer<T>> Copy for Mint<T, R>
impl<T: Integer + Clone, R: Reducer<T>> Eq for Mint<T, R>
Auto Trait Implementations§
impl<T, R> Freeze for Mint<T, R>
impl<T, R> RefUnwindSafe for Mint<T, R>where
T: RefUnwindSafe,
R: RefUnwindSafe,
impl<T, R> Send for Mint<T, R>
impl<T, R> Sync for Mint<T, R>
impl<T, R> Unpin for Mint<T, R>
impl<T, R> UnwindSafe for Mint<T, R>where
T: UnwindSafe,
R: UnwindSafe,
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<T> FmtForward for T
impl<T> FmtForward for T
source§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.source§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.source§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.source§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.source§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.source§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.source§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.source§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.source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 moresource§impl<T> LucasUtils for Twhere
T: FromPrimitive + ToPrimitive + NumRef + BitTest + ExactRoots + Clone + ModularRefOps + Integer,
&'r T: for<'r> RefNum<T> + for<'r> ModularUnaryOps<Output = T> + for<'r> ModularCoreOps<Output = T>,
impl<T> LucasUtils for Twhere
T: FromPrimitive + ToPrimitive + NumRef + BitTest + ExactRoots + Clone + ModularRefOps + Integer,
&'r T: for<'r> RefNum<T> + for<'r> ModularUnaryOps<Output = T> + for<'r> ModularCoreOps<Output = T>,
source§fn lucasm(p: usize, q: isize, m: T, n: T) -> (T, T)
fn lucasm(p: usize, q: isize, m: T, n: T) -> (T, T)
Find Lucas sequence to n with modulo m, i.e. $U_{n+1}(P,Q)$ mod m and $V_{n+1}(P,Q)$
source§fn pq_selfridge(n: &T) -> (usize, isize)
fn pq_selfridge(n: &T) -> (usize, isize)
Find proper parameters P and Q of Lucas pseudoprime test for n, such that Jacobi(D|n) is -1,
using Selfridge’s method (referred as method A by Baillie).
source§fn p_bruteforce(n: &T) -> usize
fn p_bruteforce(n: &T) -> usize
Find proper parameters P of extra strong Lucas pseudoprime test for n, such that Jacobi(D|n) is -1,
using brute-force searching (referred as method C by Baillie)
source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
source§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
source§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 moresource§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 moresource§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
source§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
source§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.source§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.source§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> PrimalityUtils for Twhere
T: NumRef + Clone + FromPrimitive + LucasUtils + BitTest + ModularRefOps + Integer,
&'r T: for<'r> RefNum<T> + for<'r> Shr<usize, Output = T> + for<'r> ModularUnaryOps<Output = T>,
impl<T> PrimalityUtils for Twhere
T: NumRef + Clone + FromPrimitive + LucasUtils + BitTest + ModularRefOps + Integer,
&'r T: for<'r> RefNum<T> + for<'r> Shr<usize, Output = T> + for<'r> ModularUnaryOps<Output = T>,
source§fn is_sprp(&self, base: T) -> bool
fn is_sprp(&self, base: T) -> bool
Test if the integer is a strong probable prime (based on Miller-Rabin test).
source§fn test_sprp(&self, base: T) -> Either<bool, T>
fn test_sprp(&self, base: T) -> Either<bool, T>
Do a Miller-Rabin test. The return value is a integer if it finds a factor of
the integer, otherwise it reports the test result.
source§fn is_lprp(&self, p: Option<usize>, q: Option<isize>) -> bool
fn is_lprp(&self, p: Option<usize>, q: Option<isize>) -> bool
Test if the integer is a Lucas probable prime
If either of p, q is not specified, then we will use Selfridge’s Method A to choose p, q
source§impl<T> Tap for T
impl<T> Tap for T
source§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 moresource§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 moresource§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 moresource§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 moresource§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 moresource§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 moresource§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.source§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.source§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.source§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.source§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.source§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.source§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.