binius_core::transcript

Trait CanWrite

Source
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§

Source

fn buffer(&mut self) -> impl BufMut + '_

Provided Methods§

Source

fn write<T: SerializeBytes>(&mut self, value: &T)

Source

fn write_slice<T: SerializeBytes>(&mut self, values: &[T])

Source

fn write_bytes(&mut self, data: &[u8])

Source

fn write_scalar<F: TowerField>(&mut self, f: F)

Source

fn write_scalar_slice<F: TowerField>(&mut self, elems: &[F])

Source

fn write_packed<P: PackedField<Scalar: TowerField>>(&mut self, packed: P)

Source

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.

Implementations on Foreign Types§

Source§

impl<'a, U: 'a + CanWrite + ?Sized> CanWrite for &'a mut U

Source§

fn buffer(&mut self) -> impl BufMut + '_

Source§

fn write<T: SerializeBytes>(&mut self, value: &T)

Source§

fn write_slice<T: SerializeBytes>(&mut self, values: &[T])

Source§

fn write_bytes(&mut self, data: &[u8])

Source§

fn write_scalar<F: TowerField>(&mut self, f: F)

Source§

fn write_scalar_slice<F: TowerField>(&mut self, elems: &[F])

Source§

fn write_packed<P: PackedField<Scalar: TowerField>>(&mut self, packed: P)

Source§

fn write_packed_slice<P: PackedField<Scalar: TowerField>>( &mut self, packed_slice: &[P], )

Implementors§

Source§

impl CanWrite for AdviceWriter

Source§

impl<Challenger_: Challenger> CanWrite for TranscriptWriter<Challenger_>