pub trait ToBytes {
    fn write_le<W>(&self, writer: W) -> Result<(), Error>
    where
        W: Write,
        Self: Sized
; fn to_bytes_le(&self) -> Result<Vec<u8, Global>, Error>
    where
        Self: Sized
, { ... } }

Required Methods§

source

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,
    Self: Sized,

Writes self into writer as little-endian bytes.

Provided Methods§

source

fn to_bytes_le(&self) -> Result<Vec<u8, Global>, Error>where
    Self: Sized,

Returns self as a byte array in little-endian order.

Implementations on Foreign Types§

source§

impl<P> ToBytes for G2Prepared<P>where
    P: Bls12Parameters,

source§

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,

source§

impl<P> ToBytes for G1Prepared<P>where
    P: Bls12Parameters,

source§

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,

source§

impl<P> ToBytes for Affine<P>where
    P: ShortWeierstrassParameters,

source§

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,

source§

impl<P> ToBytes for Affine<P>where
    P: TwistedEdwardsParameters,

source§

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,

source§

impl<P> ToBytes for Projective<P>where
    P: TwistedEdwardsParameters,

source§

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,

source§

impl<P> ToBytes for Projective<P>where
    P: ShortWeierstrassParameters,

source§

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,

source§

impl<P> ToBytes for Fp2<P>where
    P: Fp2Parameters,

source§

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,

source§

impl<P> ToBytes for Fp12<P>where
    P: Fp12Parameters,

source§

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,

source§

impl<P> ToBytes for Fp6<P>where
    P: Fp6Parameters,

source§

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,

source§

impl<P> ToBytes for Fp384<P>where
    P: Fp384Parameters,

source§

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,

source§

impl<P> ToBytes for Fp256<P>where
    P: Fp256Parameters,

source§

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,

source§

impl<L, R> ToBytes for (L, R)where
    L: ToBytes,
    R: ToBytes,

source§

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,

source§

impl<const N: usize> ToBytes for [u32; N]

source§

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,

source§

impl ToBytes for i128

source§

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,

source§

impl ToBytes for u128

source§

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,

source§

impl ToBytes for i8

source§

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,

source§

impl<'a, T> ToBytes for &'a [T]where
    T: 'a + ToBytes,

source§

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,

source§

impl ToBytes for ()

source§

fn write_le<W>(&self, _writer: W) -> Result<(), Error>where
    W: Write,

source§

impl<const N: usize> ToBytes for [u16; N]

source§

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,

source§

impl<'a, T> ToBytes for &'a Twhere
    T: 'a + ToBytes,

source§

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,

source§

impl ToBytes for i16

source§

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,

source§

impl<T> ToBytes for Vec<T, Global>where
    T: ToBytes,

source§

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,

source§

impl ToBytes for u8

source§

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,

source§

impl ToBytes for u32

source§

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,

source§

impl ToBytes for u16

source§

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,

source§

impl ToBytes for i32

source§

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,

source§

impl ToBytes for bool

source§

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,

source§

impl ToBytes for i64

source§

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,

source§

impl ToBytes for u64

source§

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,

source§

impl<const N: usize> ToBytes for [u8; N]

source§

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,

source§

impl<const N: usize> ToBytes for [u64; N]

source§

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,

§

impl<E> ToBytes for Field<E>where
    E: Environment,

§

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,

Writes the field to a buffer.

§

impl<E> ToBytes for Boolean<E>where
    E: Environment,

§

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,

Writes the boolean to a buffer.

§

impl<E> ToBytes for Group<E>where
    E: Environment,

§

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,

Writes the group to a buffer.

§

impl<E> ToBytes for Scalar<E>where
    E: Environment,

§

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,

Writes the scalar to a buffer.

§

impl<E, I> ToBytes for Integer<E, I>where
    E: Environment,
    I: IntegerType,

§

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,

Writes the integer to a buffer.

source§

impl<E, MM> ToBytes for CircuitVerifyingKey<E, MM>where
    E: PairingEngine,
    MM: MarlinMode,

source§

fn write_le<W>(&self, w: W) -> Result<(), Error>where
    W: Write,

source§

impl<E> ToBytes for KZGCommitment<E>where
    E: PairingEngine,

source§

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,

source§

impl<E> ToBytes for KZGProof<E>where
    E: PairingEngine,

source§

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,

source§

impl<E> ToBytes for VerifierKey<E>where
    E: PairingEngine,

source§

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,

source§

impl<E> ToBytes for BatchLCProof<E>where
    E: PairingEngine,

source§

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,

source§

impl<E> ToBytes for UniversalParams<E>where
    E: PairingEngine,

source§

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,

source§

impl<E, MM> ToBytes for CircuitProvingKey<E, MM>where
    E: PairingEngine,
    MM: MarlinMode,

source§

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,

source§

impl<E> ToBytes for Proof<E>where
    E: PairingEngine,

source§

fn write_le<W>(&self, w: W) -> Result<(), Error>where
    W: Write,

source§

impl<E> ToBytes for Certificate<E>where
    E: PairingEngine,

source§

fn write_le<W>(&self, w: W) -> Result<(), Error>where
    W: Write,

source§

impl<E> ToBytes for CommitterKey<E>where
    E: PairingEngine,

source§

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,

source§

impl<E> ToBytes for VerifierKey<E>where
    E: PairingEngine,

source§

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,

source§

impl<C> ToBytes for LabeledCommitment<C>where
    C: CanonicalSerialize + ToBytes,

source§

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,

source§

impl<E> ToBytes for KZGRandomness<E>where
    E: PairingEngine,

source§

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,

source§

impl<E> ToBytes for PowersOfG<E>where
    E: PairingEngine,

source§

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,

Writes the powers to the buffer.

source§

impl<E> ToBytes for PowersOfBetaG<E>where
    E: PairingEngine,

source§

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,

Writes the powers to the buffer.

source§

impl<E, const DEPTH: u8> ToBytes for MerklePath<E, DEPTH>where
    E: Environment,

source§

fn write_le<W>(&self, writer: W) -> Result<(), Error>where
    W: Write,

Writes the Merkle path to a buffer.

Implementors§

source§

impl ToBytes for BigInteger256

source§

impl ToBytes for BigInteger384

source§

impl<F: FieldTrait, const PREFIX: u16> ToBytes for AleoID<F, PREFIX>

source§

impl<T: Clone + Debug + ToBytes + FromBytes + PartialEq + Eq + Sync + Send, const PREFIX: u32, const SIZE_IN_DATA_BYTES: usize> ToBytes for AleoObject<T, PREFIX, SIZE_IN_DATA_BYTES>