pub trait ToBytes {
    // Required method
    fn write_le<W>(&self, writer: W) -> Result<(), Error>
       where W: Write,
             Self: Sized;

    // Provided method
    fn to_bytes_le(&self) -> Result<Vec<u8>, 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>, Error>
where Self: Sized,

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

Implementations on Foreign Types§

source§

impl ToBytes for SocketAddr

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 i8

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 ToBytes for i32

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 i128

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 u16

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 u64

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 ()

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<'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<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<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 Fp6<P>
where P: Fp6Parameters,

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 Fp256<P>
where P: Fp256Parameters,

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,

§

impl<P> ToBytes for Affine<P>

§

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 G1Prepared<P>
where P: Bls12Parameters,

§

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 Projective<P>

§

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,

source§

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

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 [u16; N]

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<const N: usize> ToBytes for [u64; N]

source§

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

Implementors§

source§

impl ToBytes for BigInteger256

source§

impl ToBytes for BigInteger384

§

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

§

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

§

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

§

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

§

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