halo2curves::serde::endian

Trait EndianRepr

Source
pub trait EndianRepr: Sized {
    const ENDIAN: Endian;

    // Required methods
    fn to_bytes(&self) -> Vec<u8>;
    fn from_bytes(x: &[u8]) -> CtOption<Self>;
}

Required Associated Constants§

Required Methods§

Source

fn to_bytes(&self) -> Vec<u8>

Source

fn from_bytes(x: &[u8]) -> CtOption<Self>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl EndianRepr for halo2curves::bls12381::Fq

Source§

const ENDIAN: Endian = crate::serde::endian::Endian::BE

Source§

impl EndianRepr for halo2curves::bls12381::Fr

Source§

const ENDIAN: Endian = crate::serde::endian::Endian::LE

Source§

impl EndianRepr for halo2curves::bn256::Fq

Source§

const ENDIAN: Endian = crate::serde::endian::Endian::LE

Source§

impl EndianRepr for halo2curves::bn256::Fr

Source§

const ENDIAN: Endian = crate::serde::endian::Endian::LE

Source§

impl EndianRepr for QuadExtField<Fp>

Source§

const ENDIAN: Endian = Fq::ENDIAN

Source§

impl EndianRepr for halo2curves::pluto_eris::Fp

Source§

const ENDIAN: Endian = crate::serde::endian::Endian::LE

Source§

impl EndianRepr for halo2curves::pluto_eris::Fq

Source§

const ENDIAN: Endian = crate::serde::endian::Endian::LE

Source§

impl EndianRepr for halo2curves::secp256k1::Fp

Source§

const ENDIAN: Endian = crate::serde::endian::Endian::LE

Source§

impl EndianRepr for halo2curves::secp256k1::Fq

Source§

const ENDIAN: Endian = crate::serde::endian::Endian::LE

Source§

impl EndianRepr for halo2curves::secp256r1::Fp

Source§

const ENDIAN: Endian = crate::serde::endian::Endian::LE

Source§

impl EndianRepr for halo2curves::secp256r1::Fq

Source§

const ENDIAN: Endian = crate::serde::endian::Endian::LE

Source§

impl EndianRepr for halo2curves::bls12381::Fq2

Source§

const ENDIAN: Endian = Fq::ENDIAN

Source§

impl EndianRepr for halo2curves::bn256::Fq2

Source§

const ENDIAN: Endian = Fq::ENDIAN