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§

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

Writes self into writer as little-endian bytes.

Provided Methods§

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§

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

impl ToBytes for ()

§

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

§

impl ToBytes for i64

§

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

§

impl ToBytes for i128

§

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

§

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

§

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

§

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

§

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

§

impl ToBytes for u64

§

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

§

impl ToBytes for u128

§

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

§

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

§

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

§

impl ToBytes for u32

§

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

§

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

§

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

§

impl ToBytes for u16

§

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

§

impl ToBytes for bool

§

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

§

impl ToBytes for i32

§

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

§

impl ToBytes for i16

§

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

§

impl ToBytes for i8

§

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

§

impl ToBytes for u8

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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.

Implementors§

§

impl ToBytes for BigInteger256

§

impl ToBytes for BigInteger384

source§

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

source§

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

source§

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

source§

impl<E: Environment> ToBytes for Address<E>