binius_core::transcript

Trait CanRead

source
pub trait CanRead {
    // Required methods
    fn read_bytes(&mut self, buf: &mut [u8]) -> Result<(), Error>;
    fn read_scalar_slice_into<F: TowerField>(
        &mut self,
        buf: &mut [F],
    ) -> Result<(), Error>;

    // Provided methods
    fn read_scalar<F: TowerField>(&mut self) -> Result<F, Error> { ... }
    fn read_scalar_slice<F: TowerField>(
        &mut self,
        len: usize,
    ) -> Result<Vec<F>, Error> { ... }
    fn read_packed<P: PackedField<Scalar: TowerField>>(
        &mut self,
    ) -> Result<P, Error> { ... }
}
Expand description

Trait that is used to read bytes and field elements from transcript/advice

Required Methods§

source

fn read_bytes(&mut self, buf: &mut [u8]) -> Result<(), Error>

source

fn read_scalar_slice_into<F: TowerField>( &mut self, buf: &mut [F], ) -> Result<(), Error>

Provided Methods§

source

fn read_scalar<F: TowerField>(&mut self) -> Result<F, Error>

source

fn read_scalar_slice<F: TowerField>( &mut self, len: usize, ) -> Result<Vec<F>, Error>

source

fn read_packed<P: PackedField<Scalar: TowerField>>( &mut self, ) -> Result<P, Error>

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'a, T: 'a + CanRead + ?Sized> CanRead for &'a mut T

source§

fn read_bytes(&mut self, buf: &mut [u8]) -> Result<(), Error>

source§

fn read_scalar<F: TowerField>(&mut self) -> Result<F, Error>

source§

fn read_scalar_slice_into<F: TowerField>( &mut self, buf: &mut [F], ) -> Result<(), Error>

source§

fn read_scalar_slice<F: TowerField>( &mut self, len: usize, ) -> Result<Vec<F>, Error>

source§

fn read_packed<P: PackedField<Scalar: TowerField>>( &mut self, ) -> Result<P, Error>

Implementors§

source§

impl CanRead for AdviceReader

source§

impl<Challenger_: Challenger> CanRead for TranscriptReader<Challenger_>