logo
pub struct CompressedRistretto(pub [u8; 32]);
Expand description

A Ristretto point, in compressed wire format.

The Ristretto encoding is canonical, so two points are equal if and only if their encodings are equal.

Tuple Fields

0: [u8; 32]

Implementations

Copy the bytes of this CompressedRistretto.

View this CompressedRistretto as an array of bytes.

Construct a CompressedRistretto from a slice of bytes.

Panics

If the input bytes slice does not have a length of 32.

Attempt to decompress to an RistrettoPoint.

Return
  • Some(RistrettoPoint) if self was the canonical encoding of a point;

  • None if self was not the canonical encoding of a point.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Determine if two items are equal. Read more

Formats the value using the given formatter. Read more

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

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

Returns the identity element of the curve. Can be used as a constructor. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

Return true if this element is the identity element of the curve.

Should always be Self

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.