snarkvm_console_account

Trait FromBytes

Source
pub trait FromBytes {
    // Required method
    fn read_le<R>(reader: R) -> Result<Self, Error>
       where R: Read,
             Self: Sized;

    // Provided method
    fn from_bytes_le(bytes: &[u8]) -> Result<Self, Error>
       where Self: Sized { ... }
}

Required Methods§

Source

fn read_le<R>(reader: R) -> Result<Self, Error>
where R: Read, Self: Sized,

Reads Self from reader as little-endian bytes.

Provided Methods§

Source

fn from_bytes_le(bytes: &[u8]) -> Result<Self, Error>
where Self: Sized,

Returns Self from a byte array in little-endian order.

Implementations on Foreign Types§

Source§

impl FromBytes for SocketAddr

Source§

fn read_le<R>(reader: R) -> Result<SocketAddr, Error>
where R: Read,

Source§

impl FromBytes for bool

Source§

fn read_le<R>(reader: R) -> Result<bool, Error>
where R: Read,

Source§

impl FromBytes for i8

Source§

fn read_le<R>(reader: R) -> Result<i8, Error>
where R: Read,

Source§

impl FromBytes for i16

Source§

fn read_le<R>(reader: R) -> Result<i16, Error>
where R: Read,

Source§

impl FromBytes for i32

Source§

fn read_le<R>(reader: R) -> Result<i32, Error>
where R: Read,

Source§

impl FromBytes for i64

Source§

fn read_le<R>(reader: R) -> Result<i64, Error>
where R: Read,

Source§

impl FromBytes for i128

Source§

fn read_le<R>(reader: R) -> Result<i128, Error>
where R: Read,

Source§

impl FromBytes for u8

Source§

fn read_le<R>(reader: R) -> Result<u8, Error>
where R: Read,

Source§

impl FromBytes for u16

Source§

fn read_le<R>(reader: R) -> Result<u16, Error>
where R: Read,

Source§

impl FromBytes for u32

Source§

fn read_le<R>(reader: R) -> Result<u32, Error>
where R: Read,

Source§

impl FromBytes for u64

Source§

fn read_le<R>(reader: R) -> Result<u64, Error>
where R: Read,

Source§

impl FromBytes for u128

Source§

fn read_le<R>(reader: R) -> Result<u128, Error>
where R: Read,

Source§

impl FromBytes for ()

Source§

fn read_le<R>(_bytes: R) -> Result<(), Error>
where R: Read,

Source§

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

Source§

fn read_le<R>(reader: R) -> Result<KZGCommitment<E>, Error>
where R: Read,

Source§

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

Source§

fn read_le<R>(reader: R) -> Result<KZGProof<E>, Error>
where R: Read,

Source§

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

Source§

fn read_le<R>(reader: R) -> Result<KZGRandomness<E>, Error>
where R: Read,

Source§

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

Source§

fn read_le<R>(reader: R) -> Result<UniversalParams<E>, Error>
where R: Read,

Source§

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

Source§

fn read_le<R>(reader: R) -> Result<VerifierKey<E>, Error>
where R: Read,

Source§

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

Source§

fn read_le<R>(reader: R) -> Result<BatchLCProof<E>, Error>
where R: Read,

Source§

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

Source§

fn read_le<R>(reader: R) -> Result<CommitterKey<E>, Error>
where R: Read,

Source§

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

Source§

fn read_le<R>(r: R) -> Result<Certificate<E>, Error>
where R: Read,

Source§

impl<E> FromBytes for CircuitVerifyingKey<E>
where E: PairingEngine,

Source§

fn read_le<R>(r: R) -> Result<CircuitVerifyingKey<E>, Error>
where R: Read,

Source§

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

Source§

fn read_le<R>(r: R) -> Result<Proof<E>, Error>
where R: Read,

Source§

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

Source§

fn read_le<R>(reader: R) -> Result<Boolean<E>, Error>
where R: Read,

Reads the boolean from a buffer.

Source§

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

Source§

fn read_le<R>(reader: R) -> Result<PowersOfBetaG<E>, Error>
where R: Read,

Reads the powers from the buffer.

Source§

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

Source§

fn read_le<R>(reader: R) -> Result<PowersOfG<E>, Error>
where R: Read,

Reads the powers from the buffer.

Source§

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

Source§

fn read_le<R>(reader: R) -> Result<Integer<E, I>, Error>
where R: Read,

Reads the integer from a buffer.

Source§

impl<E, SM> FromBytes for CircuitProvingKey<E, SM>
where E: PairingEngine, SM: SNARKMode,

Source§

fn read_le<R>(reader: R) -> Result<CircuitProvingKey<E, SM>, Error>
where R: Read,

Source§

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

Source§

fn read_le<R>(reader: R) -> Result<MerklePath<E, DEPTH>, Error>
where R: Read,

Reads in a Merkle path from a buffer.

Source§

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

Source§

fn read_le<R>(reader: R) -> Result<AleoID<F, PREFIX>, Error>
where R: Read,

Reads data into a buffer.

Source§

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

Source§

fn read_le<Reader>(reader: Reader) -> Result<(L, R), Error>
where Reader: Read,

Source§

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

Source§

fn read_le<R>(reader: R) -> Result<G1Prepared<P>, Error>
where R: Read,

Source§

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

Source§

fn read_le<R>(reader: R) -> Result<G2Prepared<P>, Error>
where R: Read,

Source§

impl<P> FromBytes for Affine<P>

Source§

fn read_le<R>(reader: R) -> Result<Affine<P>, Error>
where R: Read,

Source§

impl<P> FromBytes for Projective<P>

Source§

fn read_le<R>(reader: R) -> Result<Projective<P>, Error>
where R: Read,

Source§

impl<P> FromBytes for Affine<P>

Source§

fn read_le<R>(reader: R) -> Result<Affine<P>, Error>
where R: Read,

Source§

impl<P> FromBytes for Projective<P>

Source§

fn read_le<R>(reader: R) -> Result<Projective<P>, Error>
where R: Read,

Source§

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

Source§

fn read_le<R>(reader: R) -> Result<Fp2<P>, Error>
where R: Read,

Source§

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

Source§

fn read_le<R>(reader: R) -> Result<Fp6<P>, Error>
where R: Read,

Source§

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

Source§

fn read_le<R>(reader: R) -> Result<Fp12<P>, Error>
where R: Read,

Source§

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

Source§

fn read_le<R>(reader: R) -> Result<Fp256<P>, Error>
where R: Read,

Source§

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

Source§

fn read_le<R>(reader: R) -> Result<Fp384<P>, Error>
where R: Read,

Source§

impl<PH, const DEPTH: u8, const ARITY: u8> FromBytes for KaryMerklePath<PH, DEPTH, ARITY>
where PH: PathHash,

Source§

fn read_le<R>(reader: R) -> Result<KaryMerklePath<PH, DEPTH, ARITY>, Error>
where R: Read,

Reads in a Merkle path from a buffer.

Source§

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

Source§

fn read_le<R>(reader: R) -> Result<AleoObject<T, PREFIX>, Error>
where R: Read,

Reads data into a buffer.

Source§

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

Source§

fn read_le<R>(reader: R) -> Result<[u8; N], Error>
where R: Read,

Source§

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

Source§

fn read_le<R>(reader: R) -> Result<[u16; N], Error>
where R: Read,

Source§

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

Source§

fn read_le<R>(reader: R) -> Result<[u32; N], Error>
where R: Read,

Source§

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

Source§

fn read_le<R>(reader: R) -> Result<[u64; N], Error>
where R: Read,

Source§

impl<const VARIANT: usize> FromBytes for BooleanHash<VARIANT>

Source§

fn read_le<R>(reader: R) -> Result<BooleanHash<VARIANT>, Error>
where R: Read,

Reads self from reader in little-endian order.

Implementors§