pub struct BoxedUint(/* private fields */);Expand description
A wrapper around crypto_bigint::BoxedUint that implements Serialize and Deserialize.
Methods from Deref<Target = BoxedUint>§
Sourcepub fn adc(&self, rhs: &BoxedUint, carry: Limb) -> (BoxedUint, Limb)
pub fn adc(&self, rhs: &BoxedUint, carry: Limb) -> (BoxedUint, Limb)
Computes a + b + carry, returning the result along with the new carry.
Sourcepub fn adc_assign(&mut self, rhs: impl AsRef<[Limb]>, carry: Limb) -> Limb
pub fn adc_assign(&mut self, rhs: impl AsRef<[Limb]>, carry: Limb) -> Limb
Computes a + b + carry in-place, returning the new carry.
Panics if rhs has a larger precision than self.
Sourcepub fn wrapping_add(&self, rhs: &BoxedUint) -> BoxedUint
pub fn wrapping_add(&self, rhs: &BoxedUint) -> BoxedUint
Perform wrapping addition, discarding overflow.
Sourcepub fn add_mod(&self, rhs: &BoxedUint, p: &BoxedUint) -> BoxedUint
pub fn add_mod(&self, rhs: &BoxedUint, p: &BoxedUint) -> BoxedUint
Computes self + rhs mod p.
Assumes self + rhs as unbounded integer is < 2p.
Sourcepub fn double_mod(&self, p: &BoxedUint) -> BoxedUint
pub fn double_mod(&self, p: &BoxedUint) -> BoxedUint
Computes self + self mod p.
Assumes self as unbounded integer is < p.
Sourcepub fn bitand_limb(&self, rhs: Limb) -> BoxedUint
pub fn bitand_limb(&self, rhs: Limb) -> BoxedUint
Perform bitwise AND between self and the given Limb, performing the AND operation
on every limb of self.
Sourcepub fn wrapping_and(&self, rhs: &BoxedUint) -> BoxedUint
pub fn wrapping_and(&self, rhs: &BoxedUint) -> BoxedUint
Perform wrapping bitwise AND.
There’s no way wrapping could ever happen. This function exists so that all operations are accounted for in the wrapping operations
Sourcepub fn checked_and(&self, rhs: &BoxedUint) -> CtOption<BoxedUint>
pub fn checked_and(&self, rhs: &BoxedUint) -> CtOption<BoxedUint>
Perform checked bitwise AND, returning a CtOption which is_some always
Sourcepub fn wrapping_or(&self, rhs: &BoxedUint) -> BoxedUint
pub fn wrapping_or(&self, rhs: &BoxedUint) -> BoxedUint
Perform wrapping bitwise OR.
There’s no way wrapping could ever happen. This function exists so that all operations are accounted for in the wrapping operations
Sourcepub fn checked_or(&self, rhs: &BoxedUint) -> CtOption<BoxedUint>
pub fn checked_or(&self, rhs: &BoxedUint) -> CtOption<BoxedUint>
Perform checked bitwise OR, returning a CtOption which is_some always
Sourcepub fn wrapping_xor(&self, rhs: &BoxedUint) -> BoxedUint
pub fn wrapping_xor(&self, rhs: &BoxedUint) -> BoxedUint
Perform wrapping bitwise `XOR``.
There’s no way wrapping could ever happen. This function exists so that all operations are accounted for in the wrapping operations
Sourcepub fn checked_xor(&self, rhs: &BoxedUint) -> CtOption<BoxedUint>
pub fn checked_xor(&self, rhs: &BoxedUint) -> CtOption<BoxedUint>
Perform checked bitwise XOR, returning a CtOption which is_some always
Sourcepub fn bit(&self, index: u32) -> Choice
pub fn bit(&self, index: u32) -> Choice
Get the value of the bit at position index, as a truthy or falsy Choice.
Returns the falsy value for indices out of range.
Sourcepub fn bit_vartime(&self, index: u32) -> bool
pub fn bit_vartime(&self, index: u32) -> bool
Returns true if the bit at position index is set, false otherwise.
§Remarks
This operation is variable time with respect to index only.
Sourcepub fn bits(&self) -> u32
pub fn bits(&self) -> u32
Calculate the number of bits needed to represent this number, i.e. the index of the highest set bit.
Use BoxedUint::bits_precision to get the total capacity of this integer.
Sourcepub fn bits_vartime(&self) -> u32
pub fn bits_vartime(&self) -> u32
Calculate the number of bits needed to represent this number in variable-time with respect
to self.
Sourcepub fn leading_zeros(&self) -> u32
pub fn leading_zeros(&self) -> u32
Calculate the number of leading zeros in the binary representation of this number.
Sourcepub fn bits_precision(&self) -> u32
pub fn bits_precision(&self) -> u32
Get the precision of this BoxedUint in bits.
Sourcepub fn trailing_zeros(&self) -> u32
pub fn trailing_zeros(&self) -> u32
Calculate the number of trailing zeros in the binary representation of this number.
Sourcepub fn trailing_ones(&self) -> u32
pub fn trailing_ones(&self) -> u32
Calculate the number of trailing ones in the binary representation of this number.
Sourcepub fn trailing_zeros_vartime(&self) -> u32
pub fn trailing_zeros_vartime(&self) -> u32
Calculate the number of trailing zeros in the binary representation of this number in
variable-time with respect to self.
Sourcepub fn trailing_ones_vartime(&self) -> u32
pub fn trailing_ones_vartime(&self) -> u32
Calculate the number of trailing ones in the binary representation of this number,
variable time in self.
Sourcepub fn cmp_vartime(&self, rhs: &BoxedUint) -> Ordering
pub fn cmp_vartime(&self, rhs: &BoxedUint) -> Ordering
Returns the Ordering between self and rhs in variable time.
Sourcepub fn div_rem_limb_with_reciprocal(
&self,
reciprocal: &Reciprocal,
) -> (BoxedUint, Limb)
pub fn div_rem_limb_with_reciprocal( &self, reciprocal: &Reciprocal, ) -> (BoxedUint, Limb)
Computes self / rhs using a pre-made reciprocal,
returns the quotient (q) and remainder (r).
Sourcepub fn div_rem_limb(&self, rhs: NonZero<Limb>) -> (BoxedUint, Limb)
pub fn div_rem_limb(&self, rhs: NonZero<Limb>) -> (BoxedUint, Limb)
Computes self / rhs, returns the quotient (q) and remainder (r).
Sourcepub fn rem_limb_with_reciprocal(&self, reciprocal: &Reciprocal) -> Limb
pub fn rem_limb_with_reciprocal(&self, reciprocal: &Reciprocal) -> Limb
Computes self % rhs using a pre-made reciprocal.
Sourcepub fn div_rem(&self, rhs: &NonZero<BoxedUint>) -> (BoxedUint, BoxedUint)
pub fn div_rem(&self, rhs: &NonZero<BoxedUint>) -> (BoxedUint, BoxedUint)
Computes self / rhs, returns the quotient, remainder.
Sourcepub fn rem(&self, rhs: &NonZero<BoxedUint>) -> BoxedUint
pub fn rem(&self, rhs: &NonZero<BoxedUint>) -> BoxedUint
Computes self % rhs, returns the remainder.
Sourcepub fn div_rem_vartime(
&self,
rhs: &NonZero<BoxedUint>,
) -> (BoxedUint, BoxedUint)
pub fn div_rem_vartime( &self, rhs: &NonZero<BoxedUint>, ) -> (BoxedUint, BoxedUint)
Computes self / rhs, returns the quotient, remainder.
Variable-time with respect to rhs
Sourcepub fn rem_vartime(&self, rhs: &NonZero<BoxedUint>) -> BoxedUint
pub fn rem_vartime(&self, rhs: &NonZero<BoxedUint>) -> BoxedUint
Computes self % rhs, returns the remainder.
Variable-time with respect to rhs.
Sourcepub fn wrapping_div(&self, rhs: &NonZero<BoxedUint>) -> BoxedUint
pub fn wrapping_div(&self, rhs: &NonZero<BoxedUint>) -> BoxedUint
Wrapped division is just normal division i.e. self / rhs
There’s no way wrapping could ever happen.
This function exists, so that all operations are accounted for in the wrapping operations.
Panics if rhs == 0.
Sourcepub fn wrapping_div_vartime(&self, rhs: &NonZero<BoxedUint>) -> BoxedUint
pub fn wrapping_div_vartime(&self, rhs: &NonZero<BoxedUint>) -> BoxedUint
Wrapped division is just normal division i.e. self / rhs
There’s no way wrapping could ever happen. This function exists, so that all operations are accounted for in the wrapping operations
Sourcepub fn checked_div(&self, rhs: &BoxedUint) -> CtOption<BoxedUint>
pub fn checked_div(&self, rhs: &BoxedUint) -> CtOption<BoxedUint>
Perform checked division, returning a CtOption which is_some
only if the rhs != 0
Sourcepub fn to_be_bytes(&self) -> Box<[u8]>
pub fn to_be_bytes(&self) -> Box<[u8]>
Serialize this BoxedUint as big-endian.
Sourcepub fn to_le_bytes(&self) -> Box<[u8]>
pub fn to_le_bytes(&self) -> Box<[u8]>
Serialize this BoxedUint as little-endian.
Sourcepub fn to_string_radix_vartime(&self, radix: u32) -> String
pub fn to_string_radix_vartime(&self, radix: u32) -> String
Format a BoxedUint as a string in a given base.
Panics if radix is not in the range from 2 to 36.
Sourcepub fn inv_odd_mod(&self, modulus: &Odd<BoxedUint>) -> CtOption<BoxedUint>
pub fn inv_odd_mod(&self, modulus: &Odd<BoxedUint>) -> CtOption<BoxedUint>
Computes the multiplicative inverse of self mod modulus, where modulus is odd.
Sourcepub fn inv_mod(&self, modulus: &BoxedUint) -> CtOption<BoxedUint>
pub fn inv_mod(&self, modulus: &BoxedUint) -> CtOption<BoxedUint>
Computes the multiplicaitve inverse of self mod modulus
self and modulus must have the same number of limbs, or the function will panic
TODO: maybe some better documentation is needed
Sourcepub fn mul(&self, rhs: &BoxedUint) -> BoxedUint
pub fn mul(&self, rhs: &BoxedUint) -> BoxedUint
Multiply self by rhs.
Returns a widened output with a limb count equal to the sums of the input limb counts.
Sourcepub fn wrapping_mul(&self, rhs: &BoxedUint) -> BoxedUint
pub fn wrapping_mul(&self, rhs: &BoxedUint) -> BoxedUint
Perform wrapping multiplication, wrapping to the width of self.
Sourcepub fn mul_mod(&self, rhs: &BoxedUint, p: &BoxedUint) -> BoxedUint
pub fn mul_mod(&self, rhs: &BoxedUint, p: &BoxedUint) -> BoxedUint
Computes self * rhs mod p for odd p.
Panics if p is even.
Sourcepub fn mul_mod_special(&self, rhs: &BoxedUint, c: Limb) -> BoxedUint
pub fn mul_mod_special(&self, rhs: &BoxedUint, c: Limb) -> BoxedUint
Computes self * rhs mod p for the special modulus
p = MAX+1-c where c is small enough to fit in a single Limb.
For the modulus reduction, this function implements Algorithm 14.47 from the “Handbook of Applied Cryptography”, by A. Menezes, P. van Oorschot, and S. Vanstone, CRC Press, 1996.
Sourcepub fn wrapping_neg(&self) -> BoxedUint
pub fn wrapping_neg(&self) -> BoxedUint
Perform wrapping negation.
Sourcepub fn neg_mod(&self, p: &BoxedUint) -> BoxedUint
pub fn neg_mod(&self, p: &BoxedUint) -> BoxedUint
Computes -a mod p.
Assumes self is in [0, p).
Sourcepub fn neg_mod_special(&self, c: Limb) -> BoxedUint
pub fn neg_mod_special(&self, c: Limb) -> BoxedUint
Computes -a mod p for the special modulus
p = MAX+1-c where c is small enough to fit in a single Limb.
Sourcepub fn shl(&self, shift: u32) -> BoxedUint
pub fn shl(&self, shift: u32) -> BoxedUint
Computes self << shift.
Panics if shift >= Self::BITS.
Sourcepub fn shl_assign(&mut self, shift: u32)
pub fn shl_assign(&mut self, shift: u32)
Computes self <<= shift.
Panics if shift >= Self::BITS.
Sourcepub fn overflowing_shl(&self, shift: u32) -> (BoxedUint, Choice)
pub fn overflowing_shl(&self, shift: u32) -> (BoxedUint, Choice)
Computes self << shift.
Returns a zero and a truthy Choice if shift >= self.bits_precision(),
or the result and a falsy Choice otherwise.
Sourcepub fn overflowing_shl_assign(&mut self, shift: u32) -> Choice
pub fn overflowing_shl_assign(&mut self, shift: u32) -> Choice
Computes self <<= shift.
Returns a truthy Choice if shift >= self.bits_precision() or a falsy Choice otherwise.
Sourcepub fn wrapping_shl(&self, shift: u32) -> BoxedUint
pub fn wrapping_shl(&self, shift: u32) -> BoxedUint
Computes self << shift in a panic-free manner, masking off bits of shift which would cause the shift to
exceed the type’s width.
Sourcepub fn wrapping_shl_vartime(&self, shift: u32) -> BoxedUint
pub fn wrapping_shl_vartime(&self, shift: u32) -> BoxedUint
Computes self << shift in variable-time in a panic-free manner, masking off bits of shift which would cause
the shift to exceed the type’s width.
Sourcepub fn shl_vartime(&self, shift: u32) -> Option<BoxedUint>
pub fn shl_vartime(&self, shift: u32) -> Option<BoxedUint>
Computes self << shift.
Returns None if shift >= self.bits_precision().
NOTE: this operation is variable time with respect to shift ONLY.
When used with a fixed shift, this function is constant-time with respect to self.
Sourcepub fn shr(&self, shift: u32) -> BoxedUint
pub fn shr(&self, shift: u32) -> BoxedUint
Computes self >> shift.
Panics if shift >= Self::BITS.
Sourcepub fn shr_assign(&mut self, shift: u32)
pub fn shr_assign(&mut self, shift: u32)
Computes self >>= shift.
Panics if shift >= Self::BITS.
Sourcepub fn overflowing_shr(&self, shift: u32) -> (BoxedUint, Choice)
pub fn overflowing_shr(&self, shift: u32) -> (BoxedUint, Choice)
Computes self >> shift.
Returns a zero and a truthy Choice if shift >= self.bits_precision(),
or the result and a falsy Choice otherwise.
Sourcepub fn overflowing_shr_assign(&mut self, shift: u32) -> Choice
pub fn overflowing_shr_assign(&mut self, shift: u32) -> Choice
Computes self >>= shift.
Returns a truthy Choice if shift >= self.bits_precision() or a falsy Choice otherwise.
Sourcepub fn wrapping_shr(&self, shift: u32) -> BoxedUint
pub fn wrapping_shr(&self, shift: u32) -> BoxedUint
Computes self >> shift in a panic-free manner, masking off bits of shift which would cause the shift to
exceed the type’s width.
Sourcepub fn wrapping_shr_vartime(&self, shift: u32) -> BoxedUint
pub fn wrapping_shr_vartime(&self, shift: u32) -> BoxedUint
Computes self >> shift in variable-time in a panic-free manner, masking off bits of shift which would cause
the shift to exceed the type’s width.
Sourcepub fn shr_vartime(&self, shift: u32) -> Option<BoxedUint>
pub fn shr_vartime(&self, shift: u32) -> Option<BoxedUint>
Computes self >> shift.
Returns None if shift >= self.bits_precision().
NOTE: this operation is variable time with respect to shift ONLY.
When used with a fixed shift, this function is constant-time with respect to self.
Sourcepub fn sqrt(&self) -> BoxedUint
pub fn sqrt(&self) -> BoxedUint
Computes √(self) in constant time.
Callers can check if self is a square by squaring the result
Sourcepub fn sqrt_vartime(&self) -> BoxedUint
pub fn sqrt_vartime(&self) -> BoxedUint
Computes √(self)
Callers can check if self is a square by squaring the result
Sourcepub fn wrapping_sqrt(&self) -> BoxedUint
pub fn wrapping_sqrt(&self) -> BoxedUint
Wrapped sqrt is just normal √(self)
There’s no way wrapping could ever happen.
This function exists so that all operations are accounted for in the wrapping operations.
Sourcepub fn wrapping_sqrt_vartime(&self) -> BoxedUint
pub fn wrapping_sqrt_vartime(&self) -> BoxedUint
Wrapped sqrt is just normal √(self)
There’s no way wrapping could ever happen.
This function exists so that all operations are accounted for in the wrapping operations.
Sourcepub fn checked_sqrt(&self) -> CtOption<BoxedUint>
pub fn checked_sqrt(&self) -> CtOption<BoxedUint>
Perform checked sqrt, returning a CtOption which is_some
only if the √(self)² == self
Sourcepub fn checked_sqrt_vartime(&self) -> CtOption<BoxedUint>
pub fn checked_sqrt_vartime(&self) -> CtOption<BoxedUint>
Perform checked sqrt, returning a CtOption which is_some
only if the √(self)² == self
Sourcepub fn sbb(&self, rhs: &BoxedUint, borrow: Limb) -> (BoxedUint, Limb)
pub fn sbb(&self, rhs: &BoxedUint, borrow: Limb) -> (BoxedUint, Limb)
Computes a - (b + borrow), returning the result along with the new borrow.
Sourcepub fn sbb_assign(&mut self, rhs: impl AsRef<[Limb]>, borrow: Limb) -> Limb
pub fn sbb_assign(&mut self, rhs: impl AsRef<[Limb]>, borrow: Limb) -> Limb
Computes a - (b + borrow) in-place, returning the new borrow.
Panics if rhs has a larger precision than self.
Sourcepub fn wrapping_sub(&self, rhs: &BoxedUint) -> BoxedUint
pub fn wrapping_sub(&self, rhs: &BoxedUint) -> BoxedUint
Perform wrapping subtraction, discarding overflow.
Sourcepub fn sub_mod(&self, rhs: &BoxedUint, p: &BoxedUint) -> BoxedUint
pub fn sub_mod(&self, rhs: &BoxedUint, p: &BoxedUint) -> BoxedUint
Computes self - rhs mod p.
Assumes self - rhs as unbounded signed integer is in [-p, p).
Sourcepub fn sub_mod_special(&self, rhs: &BoxedUint, c: Limb) -> BoxedUint
pub fn sub_mod_special(&self, rhs: &BoxedUint, c: Limb) -> BoxedUint
Computes self - rhs mod p for the special modulus
p = MAX+1-c where c is small enough to fit in a single Limb.
Assumes self - rhs as unbounded signed integer is in [-p, p).
Sourcepub fn is_nonzero(&self) -> Choice
pub fn is_nonzero(&self) -> Choice
Is this BoxedUint NOT equal to zero?
Sourcepub fn as_words_mut(&mut self) -> &mut [u64]
pub fn as_words_mut(&mut self) -> &mut [u64]
Borrow the inner limbs as a mutable slice of Words.
Sourcepub fn as_limbs_mut(&mut self) -> &mut [Limb]
pub fn as_limbs_mut(&mut self) -> &mut [Limb]
Borrow the limbs of this BoxedUint mutably.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for BoxedUint
impl<'de> Deserialize<'de> for BoxedUint
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
impl Eq for BoxedUint
impl StructuralPartialEq for BoxedUint
Auto Trait Implementations§
impl Freeze for BoxedUint
impl RefUnwindSafe for BoxedUint
impl Send for BoxedUint
impl Sync for BoxedUint
impl Unpin for BoxedUint
impl UnwindSafe for BoxedUint
Blanket Implementations§
Source§impl<A, T> AsBits<T> for A
impl<A, T> AsBits<T> for A
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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,
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,
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,
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,
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,
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,
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,
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,
self to use its UpperHex implementation when
Debug-formatted.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> 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>
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>
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> 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,
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,
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,
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
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
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
self, then passes self.deref() into the pipe function.Source§impl<T> Pointable for T
impl<T> Pointable for T
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
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
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
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
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
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
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
.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
.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
.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
.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
.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
.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
.tap_deref() only in debug builds, and is erased in release
builds.