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§

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

Reads Self from reader as little-endian bytes.

Provided Methods§

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§

§

impl FromBytes for SocketAddr

§

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

source§

impl FromBytes for LiteralType

source§

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

§

impl FromBytes for bool

§

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

§

impl FromBytes for i8

§

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

§

impl FromBytes for i16

§

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

§

impl FromBytes for i32

§

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

§

impl FromBytes for i64

§

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

§

impl FromBytes for i128

§

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

§

impl FromBytes for u8

§

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

§

impl FromBytes for u16

§

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

§

impl FromBytes for u32

§

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

§

impl FromBytes for u64

§

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

§

impl FromBytes for u128

§

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

§

impl FromBytes for ()

§

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

§

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

§

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

Reads in an account address from a buffer.

§

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

§

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

§

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

§

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

Reads the boolean from a buffer.

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

Reads the field from a buffer.

§

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

§

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

Reads the group from a buffer.

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

Reads the powers from the buffer.

§

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

§

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

Reads the powers from the buffer.

§

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

§

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

§

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

§

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

Reads the scalar from a buffer.

§

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

§

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

Reads the string from a buffer.

§

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

§

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

§

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

§

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

§

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

§

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

Reads the integer from a buffer.

§

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

§

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.

§

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

§

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

source§

impl<N> FromBytes for Access<N>
where N: Network,

source§

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

Reads the access from a buffer.

source§

impl<N> FromBytes for Argument<N>
where N: Network,

source§

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

source§

impl<N> FromBytes for Literal<N>
where N: Network,

source§

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

Reads the literal from a buffer.

source§

impl<N> FromBytes for Plaintext<N>
where N: Network,

source§

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

Reads the plaintext from a buffer.

source§

impl<N> FromBytes for Register<N>
where N: Network,

source§

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

Reads the register from a buffer.

source§

impl<N> FromBytes for Value<N>
where N: Network,

source§

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

Reads the entry from a buffer.

source§

impl<N> FromBytes for FinalizeType<N>
where N: Network,

source§

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

Reads the finalize type from a buffer.

source§

impl<N> FromBytes for PlaintextType<N>
where N: Network,

source§

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

Reads a plaintext type from a buffer.

source§

impl<N> FromBytes for EntryType<N>
where N: Network,

source§

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

Reads the entry type from a buffer.

source§

impl<N> FromBytes for RegisterType<N>
where N: Network,

source§

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

Reads the register type from a buffer.

source§

impl<N> FromBytes for ValueType<N>
where N: Network,

source§

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

Reads the value type from a buffer.

source§

impl<N> FromBytes for InputID<N>
where N: Network,

source§

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

Reads the input ID from a buffer.

source§

impl<N> FromBytes for ComputeKey<N>
where N: Network,

source§

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

Reads an account compute key from a buffer.

source§

impl<N> FromBytes for GraphKey<N>
where N: Network,

source§

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

Reads an account graph key from a buffer.

source§

impl<N> FromBytes for PrivateKey<N>
where N: Network,

source§

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

Reads an account private key from a buffer.

source§

impl<N> FromBytes for Signature<N>
where N: Network,

source§

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

Reads an account signature from a buffer.

source§

impl<N> FromBytes for ViewKey<N>
where N: Network,

source§

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

Reads an account view key from a buffer.

source§

impl<N> FromBytes for Ciphertext<N>
where N: Network,

source§

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

Reads the ciphertext from a buffer.

source§

impl<N> FromBytes for Future<N>
where N: Network,

source§

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

Reads in a future from a buffer.

source§

impl<N> FromBytes for Identifier<N>
where N: Network,

source§

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

Reads in an identifier from a buffer.

source§

impl<N> FromBytes for ArrayType<N>
where N: Network,

source§

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

source§

impl<N> FromBytes for RecordType<N>
where N: Network,

source§

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

Reads a record type from a buffer.

source§

impl<N> FromBytes for StructType<N>
where N: Network,

source§

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

Reads a struct type from a buffer.

source§

impl<N> FromBytes for ProgramID<N>
where N: Network,

source§

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

Reads the program ID from a buffer.

source§

impl<N> FromBytes for Locator<N>
where N: Network,

source§

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

Reads the locator from a buffer.

source§

impl<N> FromBytes for ProgramOwner<N>
where N: Network,

source§

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

Reads the program owner from a buffer.

source§

impl<N> FromBytes for Request<N>
where N: Network,

source§

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

Reads the request from a buffer.

source§

impl<N> FromBytes for HeaderLeaf<N>
where N: Network,

source§

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

Reads the header leaf from a buffer.

source§

impl<N> FromBytes for StatePath<N>
where N: Network,

source§

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

Reads the path from a buffer.

source§

impl<N> FromBytes for TransactionLeaf<N>
where N: Network,

source§

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

Reads the transaction leaf from a buffer.

source§

impl<N> FromBytes for TransitionLeaf<N>
where N: Network,

source§

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

Reads the transition leaf from a buffer.

source§

impl<N, Private> FromBytes for Entry<N, Private>
where N: Network, Private: Visibility,

source§

fn read_le<R>(reader: R) -> Result<Entry<N, Private>, Error>
where R: Read,

Reads the entry from a buffer.

source§

impl<N, Private> FromBytes for Owner<N, Private>
where N: Network, Private: Visibility,

source§

fn read_le<R>(reader: R) -> Result<Owner<N, Private>, Error>
where R: Read,

Reads the owner from a buffer.

source§

impl<N, Private> FromBytes for Record<N, Private>
where N: Network, Private: Visibility,

source§

fn read_le<R>(reader: R) -> Result<Record<N, Private>, Error>
where R: Read,

Reads the record from a buffer.

§

impl<P> FromBytes for Affine<P>

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

impl<P> FromBytes for Projective<P>

§

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

§

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

§

fn read_le<R>(reader: R) -> Result<Projective<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.

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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§

§

impl FromBytes for BigInteger256

§

impl FromBytes for BigInteger384