Trait halo2_backend::helpers::SerdeCurveAffine
source · pub trait SerdeCurveAffine: CurveAffine + SerdeObject {
// Provided methods
fn read<R: Read>(reader: &mut R, format: SerdeFormat) -> Result<Self> { ... }
fn write<W: Write>(&self, writer: &mut W, format: SerdeFormat) -> Result<()> { ... }
fn byte_length(format: SerdeFormat) -> usize { ... }
}
Provided Methods§
sourcefn read<R: Read>(reader: &mut R, format: SerdeFormat) -> Result<Self>
fn read<R: Read>(reader: &mut R, format: SerdeFormat) -> Result<Self>
Reads an element from the buffer and parses it according to the format
:
Processed
: Reads a compressed curve element and decompress itRawBytes
: Reads an uncompressed curve element with coordinates in Montgomery form. Checks that field elements are less than modulus, and then checks that the point is on the curve.RawBytesUnchecked
: Reads an uncompressed curve element with coordinates in Montgomery form; does not perform any checks
sourcefn write<W: Write>(&self, writer: &mut W, format: SerdeFormat) -> Result<()>
fn write<W: Write>(&self, writer: &mut W, format: SerdeFormat) -> Result<()>
Writes a curve element according to format
:
Processed
: Writes a compressed curve element- Otherwise: Writes an uncompressed curve element with coordinates in Montgomery form
sourcefn byte_length(format: SerdeFormat) -> usize
fn byte_length(format: SerdeFormat) -> usize
Byte length of an affine curve element according to format
.
Object Safety§
This trait is not object safe.