Skip to main content

ProjectivePoint

Struct ProjectivePoint 

Source
pub struct ProjectivePoint { /* private fields */ }
Available on crate feature arithmetic only.
Expand description

A point on the secp256k1 curve in projective coordinates.

Implementations§

Source§

impl ProjectivePoint

Source

pub fn mul_by_generator(k: &Scalar) -> ProjectivePoint

Calculates k * G, where G is the generator.

Source

pub fn mul_by_generator_vartime(k: &Scalar) -> ProjectivePoint

Calculates k * G in variable-time, where G is the generator.

Source§

impl ProjectivePoint

Source

pub const IDENTITY: Self

Additive identity of the group: the point at infinity.

Source

pub const GENERATOR: Self

Base point of secp256k1.

Source

pub fn to_affine(&self) -> AffinePoint

Returns the affine representation of this point.

Source

pub fn double(&self) -> ProjectivePoint

Doubles this point.

Source

pub fn double_in_place(&mut self)

Doubles this point in-place.

Source

pub fn endomorphism(&self) -> Self

Calculates SECP256k1 endomorphism: self * lambda.

Source

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 for ProjectivePoint

Source§

type Output = ProjectivePoint

The resulting type after applying the + operator.
Source§

fn add(self, rhs: ProjectivePoint) -> ProjectivePoint

Performs the + operation. Read more
Source§

impl Add<&AffinePoint> for &ProjectivePoint

Source§

type Output = ProjectivePoint

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &AffinePoint) -> ProjectivePoint

Performs the + operation. Read more
Source§

impl Add<&AffinePoint> for ProjectivePoint

Source§

type Output = ProjectivePoint

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &AffinePoint) -> ProjectivePoint

Performs the + operation. Read more
Source§

impl Add<&ProjectivePoint> for &ProjectivePoint

Source§

type Output = ProjectivePoint

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &ProjectivePoint) -> ProjectivePoint

Performs the + operation. Read more
Source§

impl Add<&ProjectivePoint> for ProjectivePoint

Source§

type Output = ProjectivePoint

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &ProjectivePoint) -> ProjectivePoint

Performs the + operation. Read more
Source§

impl Add<AffinePoint> for ProjectivePoint

Source§

type Output = ProjectivePoint

The resulting type after applying the + operator.
Source§

fn add(self, rhs: AffinePoint) -> ProjectivePoint

Performs the + operation. Read more
Source§

impl AddAssign for ProjectivePoint

Source§

fn add_assign(&mut self, rhs: ProjectivePoint)

Performs the += operation. Read more
Source§

impl AddAssign<&AffinePoint> for ProjectivePoint

Source§

fn add_assign(&mut self, rhs: &AffinePoint)

Performs the += operation. Read more
Source§

impl AddAssign<&ProjectivePoint> for ProjectivePoint

Source§

fn add_assign(&mut self, rhs: &ProjectivePoint)

Performs the += operation. Read more
Source§

impl AddAssign<AffinePoint> for ProjectivePoint

Source§

fn add_assign(&mut self, rhs: AffinePoint)

Performs the += operation. Read more
Source§

impl<U: ArraySize> BatchNormalize<Array<ProjectivePoint, U>> for ProjectivePoint

Source§

type Output = Array<AffinePoint, U>

The output of the batch normalization; a container of affine points.
Source§

fn batch_normalize(points: &Array<Self, U>) -> Array<AffinePoint, U>

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§

fn batch_normalize_vartime(points: &Array<Self, U>) -> Array<AffinePoint, U>

Perform a batched conversion to affine representation on a sequence of projective points in variable-time. Read more
Source§

impl<const N: usize> BatchNormalize<[ProjectivePoint; N]> for ProjectivePoint

Source§

type Output = [AffinePoint; N]

The output of the batch normalization; a container of affine points.
Source§

fn batch_normalize(points: &[Self; N]) -> [AffinePoint; 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§

fn batch_normalize_vartime(points: &[Self; N]) -> [AffinePoint; N]

Perform a batched conversion to affine representation on a sequence of projective points in variable-time. Read more
Source§

impl BatchNormalize<[ProjectivePoint]> for ProjectivePoint

Available on crate feature alloc only.
Source§

type Output = Vec<AffinePoint>

The output of the batch normalization; a container of affine points.
Source§

fn batch_normalize(points: &[Self]) -> Vec<AffinePoint>

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§

fn batch_normalize_vartime(points: &[Self]) -> Vec<AffinePoint>

Perform a batched conversion to affine representation on a sequence of projective points in variable-time. Read more
Source§

impl Clone for ProjectivePoint

Source§

fn clone(&self) -> ProjectivePoint

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl CofactorGroup for ProjectivePoint

secp256k1 has a cofactor of 1.

Source§

type Subgroup = ProjectivePoint

The large prime-order subgroup in which cryptographic operations are performed. If Self implements PrimeGroup, then Self::Subgroup may be Self.
Source§

fn clear_cofactor(&self) -> Self::Subgroup

Maps self to the prime-order subgroup by multiplying this element by some k-multiple of the cofactor. Read more
Source§

fn into_subgroup(self) -> CtOption<Self::Subgroup>

Returns self if it is contained in the prime-order subgroup. Read more
Source§

fn is_torsion_free(&self) -> Choice

Determines if this element is “torsion free”, i.e., is contained in the prime-order subgroup. Read more
Source§

fn is_small_order(&self) -> Choice

Determines if this element is of small order. Read more
Source§

impl ConditionallySelectable for ProjectivePoint

Source§

fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self

Select a or b according to choice. Read more
Source§

fn conditional_assign(&mut self, other: &Self, choice: Choice)

Conditionally assign other to self, according to choice. Read more
Source§

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 more
Source§

impl ConstantTimeEq for ProjectivePoint

Source§

fn ct_eq(&self, other: &Self) -> Choice

Determine if two items are equal. Read more
Source§

fn ct_ne(&self, other: &Self) -> Choice

Determine if two items are NOT equal. Read more
Source§

impl Copy for ProjectivePoint

Source§

impl CtEq for ProjectivePoint

Source§

fn ct_eq(&self, other: &Self) -> Choice

Determine if self is equal to other in constant-time.
Source§

fn ct_ne(&self, other: &Rhs) -> Choice

Determine if self is NOT equal to other in constant-time.
Source§

impl CtSelect for ProjectivePoint

Source§

fn ct_select(&self, other: &Self, choice: Choice) -> Self

Select between self and other based on choice, returning a copy of the value. Read more
Source§

fn ct_swap(&mut self, other: &mut Self, choice: Choice)

Conditionally swap self and other if choice is Choice::TRUE.
Source§

impl Curve for ProjectivePoint

Source§

type Affine = AffinePoint

The affine representation for this elliptic curve.
Source§

fn to_affine(&self) -> AffinePoint

Converts this element into its affine representation.
Source§

fn batch_normalize(projective: &[Self], affine: &mut [Self::Affine])

Converts a batch of projective elements into affine elements. This function will panic if p.len() != q.len().
Source§

impl Debug for ProjectivePoint

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ProjectivePoint

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl DefaultIsZeroes for ProjectivePoint

Source§

impl Double for ProjectivePoint

Source§

fn double(&self) -> Self

Double this value, returning the doubled result.
Source§

fn double_in_place(&mut self)

Double this value in-place, assigning self + self to self.
Source§

impl Eq for ProjectivePoint

Source§

impl From<&AffinePoint> for ProjectivePoint

Source§

fn from(p: &AffinePoint) -> Self

Converts to this type from the input type.
Source§

impl From<&ProjectivePoint> for AffinePoint

Source§

fn from(p: &ProjectivePoint) -> AffinePoint

Converts to this type from the input type.
Source§

impl From<&PublicKey<Secp256k1>> for ProjectivePoint

Source§

fn from(public_key: &PublicKey) -> ProjectivePoint

Converts to this type from the input type.
Source§

impl From<AffinePoint> for ProjectivePoint

Source§

fn from(p: AffinePoint) -> Self

Converts to this type from the input type.
Source§

impl From<NonIdentity<ProjectivePoint>> for ProjectivePoint

Source§

fn from(p: NonIdentity<ProjectivePoint>) -> Self

Converts to this type from the input type.
Source§

impl From<ProjectivePoint> for AffinePoint

Source§

fn from(p: ProjectivePoint) -> AffinePoint

Converts to this type from the input type.
Source§

impl From<PublicKey<Secp256k1>> for ProjectivePoint

Source§

fn from(public_key: PublicKey) -> ProjectivePoint

Converts to this type from the input type.
Source§

impl FromSec1Point<Secp256k1> for ProjectivePoint

Source§

fn from_sec1_point(p: &Sec1Point) -> CtOption<Self>

Decode curve point from a SEC1 Sec1Point.
Source§

fn from_sec1_bytes(bytes: &[u8]) -> Result<Self, Error>

Decode curve point from the provided SEC1 encoding (compressed, uncompressed, or identity) using the Octet-String-to-Elliptic-Curve-Point conversion. Read more
Source§

fn from_encoded_point( point: &EncodedPoint<<C as Curve>::FieldBytesSize>, ) -> CtOption<Self>

👎Deprecated since 0.14.0:

use FromSec1Point::from_sec1_point instead

DEPRECATED: legacy name for FromSec1Point::from_sec1_point.
Source§

impl Generate for ProjectivePoint

Source§

fn try_generate_from_rng<R: TryCryptoRng + ?Sized>( rng: &mut R, ) -> Result<Self, R::Error>

Generate random key using the provided TryCryptoRng. Read more
Source§

fn generate_from_rng<R>(rng: &mut R) -> Self
where R: CryptoRng + ?Sized,

Generate random key using the provided CryptoRng.
Source§

fn try_generate() -> Result<Self, Error>

Available on crate feature getrandom only.
Randomly generate a value of this type using the system’s ambient cryptographically secure random number generator. Read more
Source§

fn generate() -> Self

Available on crate feature getrandom only.
Randomly generate a value of this type using the system’s ambient cryptographically secure random number generator. Read more
Source§

impl Group for ProjectivePoint

Source§

type Scalar = Scalar

Scalars modulo the order of this group’s scalar field.
Source§

fn try_random<R: TryRng + ?Sized>(rng: &mut R) -> Result<Self, R::Error>

Returns an element chosen uniformly at random from the non-identity elements of this group using a user-provided fallible RNG. Read more
Source§

fn identity() -> Self

Returns the additive identity, also known as the “neutral element”.
Source§

fn generator() -> Self

Returns a fixed generator of the prime-order subgroup.
Source§

fn is_identity(&self) -> Choice

Determines if this point is the identity.
Source§

fn double(&self) -> Self

Doubles this element.
Source§

fn mul_by_generator(k: &Scalar) -> Self

Multiply by the generator of the prime-order subgroup.
Source§

fn random<R>(rng: &mut R) -> Self
where R: Rng + ?Sized,

Returns an element chosen uniformly at random from the non-identity elements of this group using a user-provided infallible RNG. Read more
Source§

impl GroupEncoding for ProjectivePoint

Source§

type Repr = Array<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>

Attempts to deserialize a group element from its encoding.
Source§

fn from_bytes_unchecked(bytes: &Self::Repr) -> CtOption<Self>

Attempts to deserialize a group element, not checking if the element is valid. Read more
Source§

fn to_bytes(&self) -> Self::Repr

Converts this element into its byte encoding. This may or may not support encoding the identity.
Source§

impl<const N: usize> LinearCombination<[(ProjectivePoint, Scalar); N]> for ProjectivePoint

Source§

fn lincomb(points_and_scalars: &[(ProjectivePoint, Scalar); N]) -> Self

Calculates x1 * k1 + ... + xn * kn.
Source§

fn lincomb_vartime(points_and_scalars: &[(ProjectivePoint, Scalar); N]) -> Self

Calculates x1 * k1 + ... + xn * kn. Read more
Source§

impl LinearCombination<[(ProjectivePoint, Scalar)]> for ProjectivePoint

Source§

fn lincomb(points_and_scalars: &[(ProjectivePoint, Scalar)]) -> Self

Calculates x1 * k1 + ... + xn * kn.
Source§

fn lincomb_vartime(points_and_scalars: &[(ProjectivePoint, Scalar)]) -> Self

Calculates x1 * k1 + ... + xn * kn. Read more
Source§

impl Mul<&Scalar> for &ProjectivePoint

Source§

type Output = ProjectivePoint

The resulting type after applying the * operator.
Source§

fn mul(self, other: &Scalar) -> ProjectivePoint

Performs the * operation. Read more
Source§

impl Mul<&Scalar> for ProjectivePoint

Source§

type Output = ProjectivePoint

The resulting type after applying the * operator.
Source§

fn mul(self, other: &Scalar) -> ProjectivePoint

Performs the * operation. Read more
Source§

impl Mul<Scalar> for ProjectivePoint

Source§

type Output = ProjectivePoint

The resulting type after applying the * operator.
Source§

fn mul(self, other: Scalar) -> ProjectivePoint

Performs the * operation. Read more
Source§

impl MulAssign<&Scalar> for ProjectivePoint

Source§

fn mul_assign(&mut self, rhs: &Scalar)

Performs the *= operation. Read more
Source§

impl MulAssign<Scalar> for ProjectivePoint

Source§

fn mul_assign(&mut self, rhs: Scalar)

Performs the *= operation. Read more
Source§

impl MulByGeneratorVartime for ProjectivePoint

Source§

fn mul_by_generator_vartime(k: &Scalar) -> ProjectivePoint

Multiply by the generator of the prime-order subgroup. Read more
Source§

fn mul_by_generator_and_mul_add_vartime( a: &Self::Scalar, b: &Self::Scalar, p: &Self, ) -> Self

Multiply a by the generator of the prime-order subgroup, adding the result to the point P multiplied by the scalar b, i.e. compute aG + bP. Read more
Source§

impl MulVartime<&Scalar> for &ProjectivePoint

Source§

fn mul_vartime(self, other: &Scalar) -> ProjectivePoint

Multiply self by rhs in variable-time.
Source§

impl MulVartime<&Scalar> for ProjectivePoint

Source§

fn mul_vartime(self, other: &Scalar) -> ProjectivePoint

Multiply self by rhs in variable-time.
Source§

impl MulVartime<Scalar> for ProjectivePoint

Source§

fn mul_vartime(self, other: Scalar) -> ProjectivePoint

Multiply self by rhs in variable-time.
Source§

impl Neg for ProjectivePoint

Source§

type Output = ProjectivePoint

The resulting type after applying the - operator.
Source§

fn neg(self) -> ProjectivePoint

Performs the unary - operation. Read more
Source§

impl Neg for &ProjectivePoint

Source§

type Output = ProjectivePoint

The resulting type after applying the - operator.
Source§

fn neg(self) -> ProjectivePoint

Performs the unary - operation. Read more
Source§

impl PartialEq for ProjectivePoint

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<AffinePoint> for ProjectivePoint

Source§

fn eq(&self, other: &AffinePoint) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<ProjectivePoint> for AffinePoint

Source§

fn eq(&self, other: &ProjectivePoint) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PrimeCurve for ProjectivePoint

Source§

impl PrimeGroup for ProjectivePoint

Source§

impl Sub for ProjectivePoint

Source§

type Output = ProjectivePoint

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: ProjectivePoint) -> ProjectivePoint

Performs the - operation. Read more
Source§

impl Sub<&AffinePoint> for &ProjectivePoint

Source§

type Output = ProjectivePoint

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &AffinePoint) -> ProjectivePoint

Performs the - operation. Read more
Source§

impl Sub<&AffinePoint> for ProjectivePoint

Source§

type Output = ProjectivePoint

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &AffinePoint) -> ProjectivePoint

Performs the - operation. Read more
Source§

impl Sub<&ProjectivePoint> for &ProjectivePoint

Source§

type Output = ProjectivePoint

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &ProjectivePoint) -> ProjectivePoint

Performs the - operation. Read more
Source§

impl Sub<&ProjectivePoint> for ProjectivePoint

Source§

type Output = ProjectivePoint

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &ProjectivePoint) -> ProjectivePoint

Performs the - operation. Read more
Source§

impl Sub<AffinePoint> for ProjectivePoint

Source§

type Output = ProjectivePoint

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: AffinePoint) -> ProjectivePoint

Performs the - operation. Read more
Source§

impl SubAssign for ProjectivePoint

Source§

fn sub_assign(&mut self, rhs: ProjectivePoint)

Performs the -= operation. Read more
Source§

impl SubAssign<&AffinePoint> for ProjectivePoint

Source§

fn sub_assign(&mut self, rhs: &AffinePoint)

Performs the -= operation. Read more
Source§

impl SubAssign<&ProjectivePoint> for ProjectivePoint

Source§

fn sub_assign(&mut self, rhs: &ProjectivePoint)

Performs the -= operation. Read more
Source§

impl SubAssign<AffinePoint> for ProjectivePoint

Source§

fn sub_assign(&mut self, rhs: AffinePoint)

Performs the -= operation. Read more
Source§

impl Sum for ProjectivePoint

Source§

fn sum<I: Iterator<Item = Self>>(iter: I) -> Self

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl<'a> Sum<&'a ProjectivePoint> for ProjectivePoint

Source§

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 ToSec1Point<Secp256k1> for ProjectivePoint

Source§

fn to_sec1_point(&self, compress: bool) -> Sec1Point

Serialize curve point as a SEC1 Sec1Point, optionally applying point compression according to the compress flag.
Source§

fn to_sec1_bytes(&self) -> Box<[u8]>

Available on crate feature alloc only.
Encode curve point using the Elliptic-Curve-Point-to-Octet-String conversion and the point compression default for this curve as specified by the PointCompression trait.
Source§

fn to_compressed_point( &self, ) -> Array<u8, <<C as Curve>::FieldBytesSize as ModulusSize>::CompressedPointSize>

Serialize curve point as a CompressedPoint.
Source§

fn to_uncompressed_point( &self, ) -> Array<u8, <<C as Curve>::FieldBytesSize as ModulusSize>::UncompressedPointSize>

Serialize curve point as a CompressedPoint.
Source§

fn to_encoded_point( &self, compress: bool, ) -> EncodedPoint<<C as Curve>::FieldBytesSize>

👎Deprecated since 0.14.0:

use ToSec1Point::to_sec1_point instead

DEPRECATED: legacy name for ToSec1Point::to_sec1_point.
Source§

impl TryFrom<&ProjectivePoint> for PublicKey

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(point: &ProjectivePoint) -> Result<PublicKey>

Performs the conversion.
Source§

impl TryFrom<ProjectivePoint> for NonIdentity<ProjectivePoint>

The constant-time alternative is available at NonIdentity::new().

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(point: ProjectivePoint) -> Result<Self>

Performs the conversion.
Source§

impl TryFrom<ProjectivePoint> for PublicKey

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(point: ProjectivePoint) -> Result<PublicKey>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> ConditionallyNegatable for T
where T: ConditionallySelectable, &'a T: for<'a> Neg<Output = T>,

Source§

fn conditional_negate(&mut self, choice: Choice)

Negate self if choice == Choice(1); otherwise, leave it unchanged. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<P, C> FromEncodedPoint<C> for P

Source§

impl<T, Rhs, Output> GroupOps<Rhs, Output> for T
where T: Add<Rhs, Output = Output> + Sub<Rhs, Output = Output> + AddAssign<Rhs> + SubAssign<Rhs>,

Source§

impl<T, Rhs, Output> GroupOpsOwned<Rhs, Output> for T
where T: for<'r> GroupOps<&'r Rhs, Output>,

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, Rhs, Output> ScalarMul<Rhs, Output> for T
where T: Mul<Rhs, Output = Output> + MulAssign<Rhs>,

Source§

impl<T, Rhs, Output> ScalarMulOwned<Rhs, Output> for T
where T: for<'r> ScalarMul<&'r Rhs, Output>,

Source§

impl<T, C> ToEncodedPoint<C> for T
where T: ToSec1Point<C>, C: Curve, <C as Curve>::FieldBytesSize: ModulusSize,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<Z> Zeroize for Z
where Z: DefaultIsZeroes,

Source§

fn zeroize(&mut self)

Zero out this object from memory using Rust intrinsics which ensure the zeroization operation is not “optimized away” by the compiler.