Struct p256::AffinePoint
source · [−]pub struct AffinePoint { /* private fields */ }arithmetic only.Expand description
NIST P-256 (secp256r1) curve point expressed in affine coordinates.
serde support
When the serde feature of this crate is enabled, the Serialize and
Deserialize traits are impl’d for this type.
The serialization uses the SEC1 Elliptic-Curve-Point-to-Octet-String
encoding, serialized as binary.
When serialized with a text-based format, the SEC1 representation is subsequently hex encoded.
Implementations
sourceimpl AffinePoint
impl AffinePoint
sourcepub const IDENTITY: Self = Self {
x: FieldElement::ZERO,
y: FieldElement::ZERO,
infinity: 1,
}
pub const IDENTITY: Self = Self { x: FieldElement::ZERO, y: FieldElement::ZERO, infinity: 1, }
Additive identity of the group: the point at infinity.
sourcepub const GENERATOR: Self = Self {
x: FieldElement([
0xf4a1_3945_d898_c296,
0x7703_7d81_2deb_33a0,
0xf8bc_e6e5_63a4_40f2,
0x6b17_d1f2_e12c_4247,
])
.to_montgomery(),
y: FieldElement([
0xcbb6_4068_37bf_51f5,
0x2bce_3357_6b31_5ece,
0x8ee7_eb4a_7c0f_9e16,
0x4fe3_42e2_fe1a_7f9b,
])
.to_montgomery(),
infinity: 0,
}
pub const GENERATOR: Self = Self { x: FieldElement([ 0xf4a1_3945_d898_c296, 0x7703_7d81_2deb_33a0, 0xf8bc_e6e5_63a4_40f2, 0x6b17_d1f2_e12c_4247, ]) .to_montgomery(), y: FieldElement([ 0xcbb6_4068_37bf_51f5, 0x2bce_3357_6b31_5ece, 0x8ee7_eb4a_7c0f_9e16, 0x4fe3_42e2_fe1a_7f9b, ]) .to_montgomery(), infinity: 0, }
Base point of P-256.
Defined in FIPS 186-4 § D.1.2.3:
Gₓ = 6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296
Gᵧ = 4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5Trait Implementations
sourceimpl Add<&'_ AffinePoint> for &ProjectivePoint
impl Add<&'_ AffinePoint> for &ProjectivePoint
type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the + operator.
sourcefn add(self, other: &AffinePoint) -> ProjectivePoint
fn add(self, other: &AffinePoint) -> ProjectivePoint
Performs the + operation. Read more
sourceimpl Add<&'_ AffinePoint> for ProjectivePoint
impl Add<&'_ AffinePoint> for ProjectivePoint
type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the + operator.
sourcefn add(self, other: &AffinePoint) -> ProjectivePoint
fn add(self, other: &AffinePoint) -> ProjectivePoint
Performs the + operation. Read more
sourceimpl Add<AffinePoint> for ProjectivePoint
impl Add<AffinePoint> for ProjectivePoint
type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the + operator.
sourcefn add(self, other: AffinePoint) -> ProjectivePoint
fn add(self, other: AffinePoint) -> ProjectivePoint
Performs the + operation. Read more
sourceimpl AddAssign<&'_ AffinePoint> for ProjectivePoint
impl AddAssign<&'_ AffinePoint> for ProjectivePoint
sourcefn add_assign(&mut self, rhs: &AffinePoint)
fn add_assign(&mut self, rhs: &AffinePoint)
Performs the += operation. Read more
sourceimpl AddAssign<AffinePoint> for ProjectivePoint
impl AddAssign<AffinePoint> for ProjectivePoint
sourcefn add_assign(&mut self, rhs: AffinePoint)
fn add_assign(&mut self, rhs: AffinePoint)
Performs the += operation. Read more
sourceimpl AffineXCoordinate<NistP256> for AffinePoint
impl AffineXCoordinate<NistP256> for AffinePoint
sourcefn x(&self) -> FieldBytes
fn x(&self) -> FieldBytes
Get the affine x-coordinate as a serialized field element.
sourceimpl Clone for AffinePoint
impl Clone for AffinePoint
sourcefn clone(&self) -> AffinePoint
fn clone(&self) -> AffinePoint
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl ConditionallySelectable for AffinePoint
impl ConditionallySelectable for AffinePoint
sourcefn conditional_select(
a: &AffinePoint,
b: &AffinePoint,
choice: Choice
) -> AffinePoint
fn conditional_select(
a: &AffinePoint,
b: &AffinePoint,
choice: Choice
) -> AffinePoint
Select a or b according to choice. Read more
sourcefn conditional_assign(&mut self, other: &Self, choice: Choice)
fn conditional_assign(&mut self, other: &Self, choice: Choice)
Conditionally assign other to self, according to choice. Read more
sourceimpl ConstantTimeEq for AffinePoint
impl ConstantTimeEq for AffinePoint
sourcefn ct_eq(&self, other: &AffinePoint) -> Choice
fn ct_eq(&self, other: &AffinePoint) -> Choice
Determine if two items are equal. Read more
sourceimpl Debug for AffinePoint
impl Debug for AffinePoint
sourceimpl DecompactPoint<NistP256> for AffinePoint
impl DecompactPoint<NistP256> for AffinePoint
sourcefn decompact(x_bytes: &FieldBytes) -> CtOption<Self>
fn decompact(x_bytes: &FieldBytes) -> CtOption<Self>
Attempt to decompact an elliptic curve point
sourceimpl DecompressPoint<NistP256> for AffinePoint
impl DecompressPoint<NistP256> for AffinePoint
sourcefn decompress(x_bytes: &FieldBytes, y_is_odd: Choice) -> CtOption<Self>
fn decompress(x_bytes: &FieldBytes, y_is_odd: Choice) -> CtOption<Self>
Attempt to decompress an elliptic curve point.
sourceimpl Default for AffinePoint
impl Default for AffinePoint
sourceimpl<'de> Deserialize<'de> for AffinePoint
Available on crate feature serde only.
impl<'de> Deserialize<'de> for AffinePoint
serde only.sourcefn 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>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl From<&'_ AffinePoint> for ProjectivePoint
impl From<&'_ AffinePoint> for ProjectivePoint
sourcefn from(p: &AffinePoint) -> Self
fn from(p: &AffinePoint) -> Self
Converts to this type from the input type.
sourceimpl From<&'_ AffinePoint> for SharedSecret
Available on crate feature ecdh only.
impl From<&'_ AffinePoint> for SharedSecret
ecdh only.sourcefn from(affine: &AffinePoint) -> SharedSecret
fn from(affine: &AffinePoint) -> SharedSecret
Converts to this type from the input type.
sourceimpl From<&'_ ProjectivePoint> for AffinePoint
impl From<&'_ ProjectivePoint> for AffinePoint
sourcefn from(p: &ProjectivePoint) -> AffinePoint
fn from(p: &ProjectivePoint) -> AffinePoint
Converts to this type from the input type.
sourceimpl From<&'_ PublicKey<NistP256>> for AffinePoint
impl From<&'_ PublicKey<NistP256>> for AffinePoint
sourcefn from(public_key: &PublicKey) -> AffinePoint
fn from(public_key: &PublicKey) -> AffinePoint
Converts to this type from the input type.
sourceimpl From<AffinePoint> for EncodedPoint
impl From<AffinePoint> for EncodedPoint
sourcefn from(affine_point: AffinePoint) -> EncodedPoint
fn from(affine_point: AffinePoint) -> EncodedPoint
Converts to this type from the input type.
sourceimpl From<AffinePoint> for ProjectivePoint
impl From<AffinePoint> for ProjectivePoint
sourcefn from(p: AffinePoint) -> Self
fn from(p: AffinePoint) -> Self
Converts to this type from the input type.
sourceimpl From<ProjectivePoint> for AffinePoint
impl From<ProjectivePoint> for AffinePoint
sourcefn from(p: ProjectivePoint) -> AffinePoint
fn from(p: ProjectivePoint) -> AffinePoint
Converts to this type from the input type.
sourceimpl From<PublicKey<NistP256>> for AffinePoint
impl From<PublicKey<NistP256>> for AffinePoint
sourcefn from(public_key: PublicKey) -> AffinePoint
fn from(public_key: PublicKey) -> AffinePoint
Converts to this type from the input type.
sourceimpl FromEncodedPoint<NistP256> for AffinePoint
impl FromEncodedPoint<NistP256> for AffinePoint
sourcefn from_encoded_point(encoded_point: &EncodedPoint) -> CtOption<Self>
fn from_encoded_point(encoded_point: &EncodedPoint) -> CtOption<Self>
Attempts to parse the given EncodedPoint as an SEC1-encoded AffinePoint.
Returns
None value if encoded_point is not on the secp256r1 curve.
sourceimpl GroupEncoding for AffinePoint
impl GroupEncoding for AffinePoint
sourcefn from_bytes(bytes: &Self::Repr) -> CtOption<Self>
fn from_bytes(bytes: &Self::Repr) -> CtOption<Self>
NOTE: not constant-time with respect to identity point
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
sourcefn from_bytes_unchecked(bytes: &Self::Repr) -> CtOption<Self>
fn from_bytes_unchecked(bytes: &Self::Repr) -> CtOption<Self>
Attempts to deserialize a group element, not checking if the element is valid. Read more
sourceimpl Mul<&'_ Scalar> for AffinePoint
impl Mul<&'_ Scalar> for AffinePoint
type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the * operator.
sourcefn mul(self, scalar: &Scalar) -> ProjectivePoint
fn mul(self, scalar: &Scalar) -> ProjectivePoint
Performs the * operation. Read more
sourceimpl Mul<Scalar> for AffinePoint
impl Mul<Scalar> for AffinePoint
type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the * operator.
sourcefn mul(self, scalar: Scalar) -> ProjectivePoint
fn mul(self, scalar: Scalar) -> ProjectivePoint
Performs the * operation. Read more
sourceimpl Neg for AffinePoint
impl Neg for AffinePoint
sourceimpl PartialEq<AffinePoint> for AffinePoint
impl PartialEq<AffinePoint> for AffinePoint
sourceimpl PrimeCurveAffine for AffinePoint
impl PrimeCurveAffine for AffinePoint
type Scalar = Scalar
type Curve = ProjectivePoint
sourcefn identity() -> AffinePoint
fn identity() -> AffinePoint
Returns the additive identity.
sourcefn generator() -> AffinePoint
fn generator() -> AffinePoint
Returns a fixed generator of unknown exponent.
sourcefn is_identity(&self) -> Choice
fn is_identity(&self) -> Choice
Determines if this point represents the point at infinity; the additive identity. Read more
sourcefn to_curve(&self) -> ProjectivePoint
fn to_curve(&self) -> ProjectivePoint
Converts this element to its curve representation.
sourceimpl Serialize for AffinePoint
Available on crate feature serde only.
impl Serialize for AffinePoint
serde only.sourceimpl Sub<&'_ AffinePoint> for &ProjectivePoint
impl Sub<&'_ AffinePoint> for &ProjectivePoint
type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the - operator.
sourcefn sub(self, other: &AffinePoint) -> ProjectivePoint
fn sub(self, other: &AffinePoint) -> ProjectivePoint
Performs the - operation. Read more
sourceimpl Sub<&'_ AffinePoint> for ProjectivePoint
impl Sub<&'_ AffinePoint> for ProjectivePoint
type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the - operator.
sourcefn sub(self, other: &AffinePoint) -> ProjectivePoint
fn sub(self, other: &AffinePoint) -> ProjectivePoint
Performs the - operation. Read more
sourceimpl Sub<AffinePoint> for ProjectivePoint
impl Sub<AffinePoint> for ProjectivePoint
type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the - operator.
sourcefn sub(self, other: AffinePoint) -> ProjectivePoint
fn sub(self, other: AffinePoint) -> ProjectivePoint
Performs the - operation. Read more
sourceimpl SubAssign<&'_ AffinePoint> for ProjectivePoint
impl SubAssign<&'_ AffinePoint> for ProjectivePoint
sourcefn sub_assign(&mut self, rhs: &AffinePoint)
fn sub_assign(&mut self, rhs: &AffinePoint)
Performs the -= operation. Read more
sourceimpl SubAssign<AffinePoint> for ProjectivePoint
impl SubAssign<AffinePoint> for ProjectivePoint
sourcefn sub_assign(&mut self, rhs: AffinePoint)
fn sub_assign(&mut self, rhs: AffinePoint)
Performs the -= operation. Read more
sourceimpl ToCompactEncodedPoint<NistP256> for AffinePoint
impl ToCompactEncodedPoint<NistP256> for AffinePoint
sourcefn to_compact_encoded_point(&self) -> CtOption<EncodedPoint>
fn to_compact_encoded_point(&self) -> CtOption<EncodedPoint>
Serialize this value as a SEC1 compact EncodedPoint
sourceimpl ToEncodedPoint<NistP256> for AffinePoint
impl ToEncodedPoint<NistP256> for AffinePoint
sourcefn 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. Read more
sourceimpl TryFrom<&'_ AffinePoint> for PublicKey
impl TryFrom<&'_ AffinePoint> for PublicKey
sourceimpl TryFrom<&'_ EncodedPoint<<<NistP256 as Curve>::UInt as ArrayEncoding>::ByteSize>> for AffinePoint
impl TryFrom<&'_ EncodedPoint<<<NistP256 as Curve>::UInt as ArrayEncoding>::ByteSize>> for AffinePoint
sourcefn try_from(point: &EncodedPoint) -> Result<AffinePoint>
fn try_from(point: &EncodedPoint) -> Result<AffinePoint>
Performs the conversion.
sourceimpl TryFrom<AffinePoint> for PublicKey
impl TryFrom<AffinePoint> for PublicKey
sourceimpl TryFrom<EncodedPoint<<<NistP256 as Curve>::UInt as ArrayEncoding>::ByteSize>> for AffinePoint
impl TryFrom<EncodedPoint<<<NistP256 as Curve>::UInt as ArrayEncoding>::ByteSize>> for AffinePoint
sourcefn try_from(point: EncodedPoint) -> Result<AffinePoint>
fn try_from(point: EncodedPoint) -> Result<AffinePoint>
Performs the conversion.
sourceimpl VerifyPrimitive<NistP256> for AffinePoint
Available on crate feature ecdsa-core only.
impl VerifyPrimitive<NistP256> for AffinePoint
ecdsa-core only.impl Copy for AffinePoint
impl DefaultIsZeroes for AffinePoint
impl Eq for AffinePoint
Auto Trait Implementations
impl RefUnwindSafe for AffinePoint
impl Send for AffinePoint
impl Sync for AffinePoint
impl Unpin for AffinePoint
impl UnwindSafe for AffinePoint
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
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. Read more
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. Read more
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. Read more
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. Read more
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. Read more
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. Read more
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. Read more
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. Read more
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
impl<T> Pipe for T where
T: ?Sized,
impl<T> Pipe for T where
T: ?Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
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) -> R where
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R where
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) -> R where
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R where
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 where
Self: Borrow<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R where
Self: Borrow<B>,
B: 'a + ?Sized,
R: 'a,
Borrows self, then passes self.borrow() into the pipe function. Read more
fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> R where
Self: BorrowMut<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> R where
Self: BorrowMut<B>,
B: 'a + ?Sized,
R: 'a,
Mutably borrows self, then passes self.borrow_mut() into the pipe
function. Read more
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R where
Self: AsRef<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R where
Self: AsRef<U>,
U: 'a + ?Sized,
R: 'a,
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 where
Self: AsMut<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R where
Self: AsMut<U>,
U: 'a + ?Sized,
R: 'a,
Mutably borrows self, then passes self.as_mut() into the pipe
function. Read more
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R where
Self: Deref<Target = T>,
T: 'a + ?Sized,
R: 'a,
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R where
Self: Deref<Target = T>,
T: 'a + ?Sized,
R: 'a,
Borrows self, then passes self.deref() into the pipe function.
impl<T> Tap for T
impl<T> Tap for T
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self where
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self where
Self: Borrow<B>,
B: ?Sized,
Immutable access to the Borrow<B> of a value. Read more
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self where
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self where
Self: BorrowMut<B>,
B: ?Sized,
Mutable access to the BorrowMut<B> of a value. Read more
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self where
Self: AsRef<R>,
R: ?Sized,
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self where
Self: AsRef<R>,
R: ?Sized,
Immutable access to the AsRef<R> view of a value. Read more
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self where
Self: AsMut<R>,
R: ?Sized,
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self where
Self: AsMut<R>,
R: ?Sized,
Mutable access to the AsMut<R> view of a value. Read more
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self where
Self: Deref<Target = T>,
T: ?Sized,
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self where
Self: Deref<Target = T>,
T: ?Sized,
Immutable access to the Deref::Target of a value. Read more
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self where
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self where
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
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. Read more
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self where
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self where
Self: Borrow<B>,
B: ?Sized,
Calls .tap_borrow() only in debug builds, and is erased in release
builds. Read more
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self where
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self where
Self: BorrowMut<B>,
B: ?Sized,
Calls .tap_borrow_mut() only in debug builds, and is erased in release
builds. Read more
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self where
Self: AsRef<R>,
R: ?Sized,
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self where
Self: AsRef<R>,
R: ?Sized,
Calls .tap_ref() only in debug builds, and is erased in release
builds. Read more
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self where
Self: AsMut<R>,
R: ?Sized,
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self where
Self: AsMut<R>,
R: ?Sized,
Calls .tap_ref_mut() only in debug builds, and is erased in release
builds. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more