pub trait CanWrite {
// Required method
fn buffer(&mut self) -> impl BufMut + '_;
// Provided methods
fn write<T: SerializeBytes>(&mut self, value: &T) { ... }
fn write_slice<T: SerializeBytes>(&mut self, values: &[T]) { ... }
fn write_bytes(&mut self, data: &[u8]) { ... }
fn write_scalar<F: TowerField>(&mut self, f: F) { ... }
fn write_scalar_slice<F: TowerField>(&mut self, elems: &[F]) { ... }
fn write_packed<P: PackedField<Scalar: TowerField>>(&mut self, packed: P) { ... }
fn write_packed_slice<P: PackedField<Scalar: TowerField>>(
&mut self,
packed_slice: &[P],
) { ... }
}
Expand description
Trait that is used to write bytes and field elements to transcript/advice
Required Methods§
Provided Methods§
fn write<T: SerializeBytes>(&mut self, value: &T)
fn write_slice<T: SerializeBytes>(&mut self, values: &[T])
fn write_bytes(&mut self, data: &[u8])
fn write_scalar<F: TowerField>(&mut self, f: F)
fn write_scalar_slice<F: TowerField>(&mut self, elems: &[F])
fn write_packed<P: PackedField<Scalar: TowerField>>(&mut self, packed: P)
fn write_packed_slice<P: PackedField<Scalar: TowerField>>( &mut self, packed_slice: &[P], )
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.