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 { ... }
}
Writes self
into writer
as little-endian bytes.
Returns self
as a byte array in little-endian order.
Writes an account address to a buffer.
Writes the boolean to a buffer.
Writes the field to a buffer.
Writes the group to a buffer.
Writes the powers to the buffer.
Writes the powers to the buffer.
Writes the scalar to a buffer.
Writes the string to a buffer.
Writes the integer to a buffer.
Writes the Merkle path to a buffer.
Writes the data to a buffer.
Write the access to a buffer.
Writes the literal to a buffer.
Writes the plaintext to a buffer.
Writes the register to a buffer.
Writes the entry to a buffer.
Writes the finalize type to a buffer.
Writes a plaintext type to a buffer.
Writes the entry type to a buffer.
Writes the register type to a buffer.
Writes the value type to a buffer.
Writes the input ID to a buffer.
Writes an account compute key to a buffer.
Writes an account graph key to a buffer.
Writes an account private key to a buffer.
Writes an account signature to a buffer.
Writes an account view key to a buffer.
Writes the ciphertext to a buffer.
Writes a future to a buffer.
Writes an identifier to a buffer.
Writes the record type to a buffer.
Writes the struct type to a buffer.
Writes the program ID to a buffer.
Writes the locator to a buffer.
Writes the program owner to a buffer.
Writes the request to a buffer.
Writes the header leaf to a buffer.
Writes the path to a buffer.
Writes the transaction leaf to a buffer.
Writes the transition leaf to a buffer.
Writes the entry to a buffer.
Writes the owner to a buffer.
Writes the record to a buffer.
Writes the Merkle path to a buffer.
Writes the data to a buffer.
Writes self
to writer
in little-endian order.