pub struct ProjectivePoint { /* private fields */ }
Expand description
A point on the secp256k1 curve in projective coordinates.
Implementations§
Source§impl ProjectivePoint
impl ProjectivePoint
Sourcepub const fn identity() -> ProjectivePoint
👎Deprecated since 0.10.2: use ProjectivePoint::IDENTITY
instead
pub const fn identity() -> ProjectivePoint
ProjectivePoint::IDENTITY
insteadReturns the additive identity of SECP256k1, also known as the “neutral element” or “point at infinity”.
Sourcepub fn generator() -> ProjectivePoint
👎Deprecated since 0.10.2: use ProjectivePoint::GENERATOR
instead
pub fn generator() -> ProjectivePoint
ProjectivePoint::GENERATOR
insteadReturns the base point of SECP256k1.
Sourcepub fn to_affine(&self) -> AffinePoint
pub fn to_affine(&self) -> AffinePoint
Returns the affine representation of this point.
Sourcepub fn double(&self) -> ProjectivePoint
pub fn double(&self) -> ProjectivePoint
Doubles this point.
Sourcepub fn endomorphism(&self) -> Self
pub fn endomorphism(&self) -> Self
Calculates SECP256k1 endomorphism: self * lambda
.
Sourcepub fn eq_affine(&self, other: &AffinePoint) -> Choice
pub fn eq_affine(&self, other: &AffinePoint) -> Choice
Check whether self
is equal to an affine point.
This is a lot faster than first converting self
to an AffinePoint
and then doing the
comparison. It is a little bit faster than converting other
to a ProjectivePoint
first.
Trait Implementations§
Source§impl Add<&AffinePoint> for &ProjectivePoint
impl Add<&AffinePoint> for &ProjectivePoint
Source§type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the
+
operator.Source§fn add(self, other: &AffinePoint) -> ProjectivePoint
fn add(self, other: &AffinePoint) -> ProjectivePoint
Performs the
+
operation. Read moreSource§impl Add<&AffinePoint> for ProjectivePoint
impl Add<&AffinePoint> for ProjectivePoint
Source§type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the
+
operator.Source§fn add(self, other: &AffinePoint) -> ProjectivePoint
fn add(self, other: &AffinePoint) -> ProjectivePoint
Performs the
+
operation. Read moreSource§impl Add<&ProjectivePoint> for &ProjectivePoint
impl Add<&ProjectivePoint> for &ProjectivePoint
Source§type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the
+
operator.Source§fn add(self, other: &ProjectivePoint) -> ProjectivePoint
fn add(self, other: &ProjectivePoint) -> ProjectivePoint
Performs the
+
operation. Read moreSource§impl Add<&ProjectivePoint> for ProjectivePoint
impl Add<&ProjectivePoint> for ProjectivePoint
Source§type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the
+
operator.Source§fn add(self, other: &ProjectivePoint) -> ProjectivePoint
fn add(self, other: &ProjectivePoint) -> ProjectivePoint
Performs the
+
operation. Read moreSource§impl Add<AffinePoint> for ProjectivePoint
impl Add<AffinePoint> for ProjectivePoint
Source§type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the
+
operator.Source§fn add(self, other: AffinePoint) -> ProjectivePoint
fn add(self, other: AffinePoint) -> ProjectivePoint
Performs the
+
operation. Read moreSource§impl Add for ProjectivePoint
impl Add for ProjectivePoint
Source§type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the
+
operator.Source§fn add(self, other: ProjectivePoint) -> ProjectivePoint
fn add(self, other: ProjectivePoint) -> ProjectivePoint
Performs the
+
operation. Read moreSource§impl AddAssign<&AffinePoint> for ProjectivePoint
impl AddAssign<&AffinePoint> for ProjectivePoint
Source§fn add_assign(&mut self, rhs: &AffinePoint)
fn add_assign(&mut self, rhs: &AffinePoint)
Performs the
+=
operation. Read moreSource§impl AddAssign<&ProjectivePoint> for ProjectivePoint
impl AddAssign<&ProjectivePoint> for ProjectivePoint
Source§fn add_assign(&mut self, rhs: &ProjectivePoint)
fn add_assign(&mut self, rhs: &ProjectivePoint)
Performs the
+=
operation. Read moreSource§impl AddAssign<AffinePoint> for ProjectivePoint
impl AddAssign<AffinePoint> for ProjectivePoint
Source§fn add_assign(&mut self, rhs: AffinePoint)
fn add_assign(&mut self, rhs: AffinePoint)
Performs the
+=
operation. Read moreSource§impl AddAssign for ProjectivePoint
impl AddAssign for ProjectivePoint
Source§fn add_assign(&mut self, rhs: ProjectivePoint)
fn add_assign(&mut self, rhs: ProjectivePoint)
Performs the
+=
operation. Read moreSource§impl BatchNormalize<[ProjectivePoint]> for ProjectivePoint
impl BatchNormalize<[ProjectivePoint]> for ProjectivePoint
Source§type Output = Vec<<ProjectivePoint as Curve>::AffineRepr>
type Output = Vec<<ProjectivePoint as Curve>::AffineRepr>
The output of the batch normalization; a container of affine points.
Source§fn batch_normalize(points: &[Self]) -> Vec<Self::AffineRepr>
fn batch_normalize(points: &[Self]) -> Vec<Self::AffineRepr>
Perform a batched conversion to affine representation on a sequence of projective points
at an amortized cost that should be practically as efficient as a single conversion.
Internally, implementors should rely upon
InvertBatch
.Source§impl<const N: usize> BatchNormalize<[ProjectivePoint; N]> for ProjectivePoint
impl<const N: usize> BatchNormalize<[ProjectivePoint; N]> for ProjectivePoint
Source§type Output = [<ProjectivePoint as Curve>::AffineRepr; N]
type Output = [<ProjectivePoint as Curve>::AffineRepr; N]
The output of the batch normalization; a container of affine points.
Source§fn batch_normalize(points: &[Self; N]) -> [Self::AffineRepr; N]
fn batch_normalize(points: &[Self; N]) -> [Self::AffineRepr; N]
Perform a batched conversion to affine representation on a sequence of projective points
at an amortized cost that should be practically as efficient as a single conversion.
Internally, implementors should rely upon
InvertBatch
.Source§impl Clone for ProjectivePoint
impl Clone for ProjectivePoint
Source§fn clone(&self) -> ProjectivePoint
fn clone(&self) -> ProjectivePoint
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl ConditionallySelectable for ProjectivePoint
impl ConditionallySelectable for ProjectivePoint
Source§fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self
fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self
Source§fn conditional_assign(&mut self, other: &Self, choice: Choice)
fn conditional_assign(&mut self, other: &Self, choice: Choice)
Source§fn conditional_swap(a: &mut Self, b: &mut Self, choice: Choice)
fn conditional_swap(a: &mut Self, b: &mut Self, choice: Choice)
Conditionally swap
self
and other
if choice == 1
; otherwise,
reassign both unto themselves. Read moreSource§impl ConstantTimeEq for ProjectivePoint
impl ConstantTimeEq for ProjectivePoint
Source§impl Curve for ProjectivePoint
impl Curve for ProjectivePoint
Source§type AffineRepr = AffinePoint
type AffineRepr = AffinePoint
The affine representation for this elliptic curve.
Source§fn to_affine(&self) -> AffinePoint
fn to_affine(&self) -> AffinePoint
Converts this element into its affine representation.
Source§fn batch_normalize(projective: &[Self], affine: &mut [Self::AffineRepr])
fn batch_normalize(projective: &[Self], affine: &mut [Self::AffineRepr])
Converts a batch of projective elements into affine elements. This function will
panic if
p.len() != q.len()
.Source§impl Debug for ProjectivePoint
impl Debug for ProjectivePoint
Source§impl Default for ProjectivePoint
impl Default for ProjectivePoint
Source§impl From<&AffinePoint> for ProjectivePoint
impl From<&AffinePoint> for ProjectivePoint
Source§fn from(p: &AffinePoint) -> Self
fn from(p: &AffinePoint) -> Self
Converts to this type from the input type.
Source§impl From<&ProjectivePoint> for AffinePoint
impl From<&ProjectivePoint> for AffinePoint
Source§fn from(p: &ProjectivePoint) -> AffinePoint
fn from(p: &ProjectivePoint) -> AffinePoint
Converts to this type from the input type.
Source§impl From<&PublicKey<Secp256k1>> for ProjectivePoint
impl From<&PublicKey<Secp256k1>> for ProjectivePoint
Source§fn from(public_key: &PublicKey) -> ProjectivePoint
fn from(public_key: &PublicKey) -> ProjectivePoint
Converts to this type from the input type.
Source§impl From<AffinePoint> for ProjectivePoint
impl From<AffinePoint> for ProjectivePoint
Source§fn from(p: AffinePoint) -> Self
fn from(p: AffinePoint) -> Self
Converts to this type from the input type.
Source§impl From<ProjectivePoint> for AffinePoint
impl From<ProjectivePoint> for AffinePoint
Source§fn from(p: ProjectivePoint) -> AffinePoint
fn from(p: ProjectivePoint) -> AffinePoint
Converts to this type from the input type.
Source§impl From<PublicKey<Secp256k1>> for ProjectivePoint
impl From<PublicKey<Secp256k1>> for ProjectivePoint
Source§fn from(public_key: PublicKey) -> ProjectivePoint
fn from(public_key: PublicKey) -> ProjectivePoint
Converts to this type from the input type.
Source§impl FromEncodedPoint<Secp256k1> for ProjectivePoint
impl FromEncodedPoint<Secp256k1> for ProjectivePoint
Source§fn from_encoded_point(p: &EncodedPoint) -> CtOption<Self>
fn from_encoded_point(p: &EncodedPoint) -> CtOption<Self>
Deserialize the type this trait is impl’d on from an
EncodedPoint
.Source§impl Group for ProjectivePoint
impl Group for ProjectivePoint
Source§impl GroupEncoding for ProjectivePoint
impl GroupEncoding for ProjectivePoint
Source§type Repr = GenericArray<u8, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B1>>
type Repr = GenericArray<u8, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B1>>
The encoding of group elements. Read more
Source§fn from_bytes(bytes: &Self::Repr) -> CtOption<Self>
fn from_bytes(bytes: &Self::Repr) -> CtOption<Self>
Attempts to deserialize a group element from its encoding.
Source§impl LinearCombinationExt<[(ProjectivePoint, Scalar)]> for ProjectivePoint
impl LinearCombinationExt<[(ProjectivePoint, Scalar)]> for ProjectivePoint
Source§fn lincomb_ext(points_and_scalars: &[(ProjectivePoint, Scalar)]) -> Self
fn lincomb_ext(points_and_scalars: &[(ProjectivePoint, Scalar)]) -> Self
Calculates
x1 * k1 + ... + xn * kn
.Source§impl<const N: usize> LinearCombinationExt<[(ProjectivePoint, Scalar); N]> for ProjectivePoint
impl<const N: usize> LinearCombinationExt<[(ProjectivePoint, Scalar); N]> for ProjectivePoint
Source§fn lincomb_ext(points_and_scalars: &[(ProjectivePoint, Scalar); N]) -> Self
fn lincomb_ext(points_and_scalars: &[(ProjectivePoint, Scalar); N]) -> Self
Calculates
x1 * k1 + ... + xn * kn
.Source§impl Mul<&Scalar> for &ProjectivePoint
impl Mul<&Scalar> for &ProjectivePoint
Source§type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the
*
operator.Source§impl Mul<&Scalar> for ProjectivePoint
impl Mul<&Scalar> for ProjectivePoint
Source§type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the
*
operator.Source§impl Mul<Scalar> for ProjectivePoint
impl Mul<Scalar> for ProjectivePoint
Source§type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the
*
operator.Source§impl MulAssign<&Scalar> for ProjectivePoint
impl MulAssign<&Scalar> for ProjectivePoint
Source§fn mul_assign(&mut self, rhs: &Scalar)
fn mul_assign(&mut self, rhs: &Scalar)
Performs the
*=
operation. Read moreSource§impl MulAssign<Scalar> for ProjectivePoint
impl MulAssign<Scalar> for ProjectivePoint
Source§fn mul_assign(&mut self, rhs: Scalar)
fn mul_assign(&mut self, rhs: Scalar)
Performs the
*=
operation. Read moreSource§impl MulByGenerator for ProjectivePoint
impl MulByGenerator for ProjectivePoint
Source§fn mul_by_generator(k: &Scalar) -> ProjectivePoint
fn mul_by_generator(k: &Scalar) -> ProjectivePoint
Calculates k * G
, where G
is the generator.
Source§impl<'a> Neg for &'a ProjectivePoint
impl<'a> Neg for &'a ProjectivePoint
Source§type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the
-
operator.Source§fn neg(self) -> ProjectivePoint
fn neg(self) -> ProjectivePoint
Performs the unary
-
operation. Read moreSource§impl Neg for ProjectivePoint
impl Neg for ProjectivePoint
Source§type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the
-
operator.Source§fn neg(self) -> ProjectivePoint
fn neg(self) -> ProjectivePoint
Performs the unary
-
operation. Read moreSource§impl PartialEq<AffinePoint> for ProjectivePoint
impl PartialEq<AffinePoint> for ProjectivePoint
Source§impl PartialEq<ProjectivePoint> for AffinePoint
impl PartialEq<ProjectivePoint> for AffinePoint
Source§impl PartialEq for ProjectivePoint
impl PartialEq for ProjectivePoint
Source§impl PrimeCurve for ProjectivePoint
impl PrimeCurve for ProjectivePoint
type Affine = AffinePoint
Source§impl Sub<&AffinePoint> for &ProjectivePoint
impl Sub<&AffinePoint> for &ProjectivePoint
Source§type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the
-
operator.Source§fn sub(self, other: &AffinePoint) -> ProjectivePoint
fn sub(self, other: &AffinePoint) -> ProjectivePoint
Performs the
-
operation. Read moreSource§impl Sub<&AffinePoint> for ProjectivePoint
impl Sub<&AffinePoint> for ProjectivePoint
Source§type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the
-
operator.Source§fn sub(self, other: &AffinePoint) -> ProjectivePoint
fn sub(self, other: &AffinePoint) -> ProjectivePoint
Performs the
-
operation. Read moreSource§impl Sub<&ProjectivePoint> for &ProjectivePoint
impl Sub<&ProjectivePoint> for &ProjectivePoint
Source§type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the
-
operator.Source§fn sub(self, other: &ProjectivePoint) -> ProjectivePoint
fn sub(self, other: &ProjectivePoint) -> ProjectivePoint
Performs the
-
operation. Read moreSource§impl Sub<&ProjectivePoint> for ProjectivePoint
impl Sub<&ProjectivePoint> for ProjectivePoint
Source§type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the
-
operator.Source§fn sub(self, other: &ProjectivePoint) -> ProjectivePoint
fn sub(self, other: &ProjectivePoint) -> ProjectivePoint
Performs the
-
operation. Read moreSource§impl Sub<AffinePoint> for ProjectivePoint
impl Sub<AffinePoint> for ProjectivePoint
Source§type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the
-
operator.Source§fn sub(self, other: AffinePoint) -> ProjectivePoint
fn sub(self, other: AffinePoint) -> ProjectivePoint
Performs the
-
operation. Read moreSource§impl Sub for ProjectivePoint
impl Sub for ProjectivePoint
Source§type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the
-
operator.Source§fn sub(self, other: ProjectivePoint) -> ProjectivePoint
fn sub(self, other: ProjectivePoint) -> ProjectivePoint
Performs the
-
operation. Read moreSource§impl SubAssign<&AffinePoint> for ProjectivePoint
impl SubAssign<&AffinePoint> for ProjectivePoint
Source§fn sub_assign(&mut self, rhs: &AffinePoint)
fn sub_assign(&mut self, rhs: &AffinePoint)
Performs the
-=
operation. Read moreSource§impl SubAssign<&ProjectivePoint> for ProjectivePoint
impl SubAssign<&ProjectivePoint> for ProjectivePoint
Source§fn sub_assign(&mut self, rhs: &ProjectivePoint)
fn sub_assign(&mut self, rhs: &ProjectivePoint)
Performs the
-=
operation. Read moreSource§impl SubAssign<AffinePoint> for ProjectivePoint
impl SubAssign<AffinePoint> for ProjectivePoint
Source§fn sub_assign(&mut self, rhs: AffinePoint)
fn sub_assign(&mut self, rhs: AffinePoint)
Performs the
-=
operation. Read moreSource§impl SubAssign for ProjectivePoint
impl SubAssign for ProjectivePoint
Source§fn sub_assign(&mut self, rhs: ProjectivePoint)
fn sub_assign(&mut self, rhs: ProjectivePoint)
Performs the
-=
operation. Read moreSource§impl<'a> Sum<&'a ProjectivePoint> for ProjectivePoint
impl<'a> Sum<&'a ProjectivePoint> for ProjectivePoint
Source§fn sum<I: Iterator<Item = &'a ProjectivePoint>>(iter: I) -> Self
fn sum<I: Iterator<Item = &'a ProjectivePoint>>(iter: I) -> Self
Takes an iterator and generates
Self
from the elements by “summing up”
the items.Source§impl Sum for ProjectivePoint
impl Sum for ProjectivePoint
Source§impl ToEncodedPoint<Secp256k1> for ProjectivePoint
impl ToEncodedPoint<Secp256k1> for ProjectivePoint
Source§fn to_encoded_point(&self, compress: bool) -> EncodedPoint
fn to_encoded_point(&self, compress: bool) -> EncodedPoint
Serialize this value as a SEC1
EncodedPoint
, optionally applying
point compression.Source§impl TryFrom<&ProjectivePoint> for PublicKey
impl TryFrom<&ProjectivePoint> for PublicKey
Source§impl TryFrom<ProjectivePoint> for PublicKey
impl TryFrom<ProjectivePoint> for PublicKey
impl Copy for ProjectivePoint
impl DefaultIsZeroes for ProjectivePoint
impl Eq for ProjectivePoint
impl PrimeGroup for ProjectivePoint
Auto Trait Implementations§
impl Freeze for ProjectivePoint
impl RefUnwindSafe for ProjectivePoint
impl Send for ProjectivePoint
impl Sync for ProjectivePoint
impl Unpin for ProjectivePoint
impl UnwindSafe for ProjectivePoint
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<T> ConditionallyNegatable for T
impl<T> ConditionallyNegatable for T
Source§fn conditional_negate(&mut self, choice: Choice)
fn conditional_negate(&mut self, choice: Choice)
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<P> LinearCombination for P
impl<P> LinearCombination for P
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> 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.