Trait FeltWriter

Source
pub trait FeltWriter {
    // Required method
    fn write(&mut self, felt: Felt);
}
Expand description

Any type where Felts can be written into. This would typically be Vec<Felt>, but can also be something like a stateful hasher.

The trait method is infallible, as the most common use case is to simply write into a Vec. Making the method infallible avoids over-engineering. However, if deemed necessary, a future breaking change can make this fallible instead.

Required Methods§

Source

fn write(&mut self, felt: Felt)

Adds a single Felt element into the writer.

Implementations on Foreign Types§

Source§

impl FeltWriter for PedersenHasher

Source§

fn write(&mut self, felt: Felt)

Source§

impl FeltWriter for PoseidonHasher

Source§

fn write(&mut self, felt: Felt)

Implementors§