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§
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>
Object Safety§
This trait is not object safe.