pub struct Encoder<WI, CI, T> { /* private fields */ }Expand description
An encoder for CDF format
Implementations§
Source§impl<WI, CI, T> Encoder<WI, CI, T>where
WI: ExactSizeIterator,
CI: ExactSizeIterator,
impl<WI, CI, T> Encoder<WI, CI, T>where
WI: ExactSizeIterator,
CI: ExactSizeIterator,
Sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Return the underlying encoder
Source§impl<WI, CI> Encoder<WI, CI, File>where
WI: ExactSizeIterator,
CI: ExactSizeIterator,
impl<WI, CI> Encoder<WI, CI, File>where
WI: ExactSizeIterator,
CI: ExactSizeIterator,
Source§impl<WI, CI, B> Encoder<WI, CI, BufWriter<B>>
impl<WI, CI, B> Encoder<WI, CI, BufWriter<B>>
Sourcepub fn init_buffer(
config: Config,
witnesses: WI,
constraints: CI,
buffer: B,
) -> Result<Self>
pub fn init_buffer( config: Config, witnesses: WI, constraints: CI, buffer: B, ) -> Result<Self>
Initialize the encoder, filling the buffer with required bytes.
Source§impl<WI, CI> Encoder<WI, CI, Cursor<Vec<u8>>>where
WI: ExactSizeIterator,
CI: ExactSizeIterator,
impl<WI, CI> Encoder<WI, CI, Cursor<Vec<u8>>>where
WI: ExactSizeIterator,
CI: ExactSizeIterator,
Sourcepub fn init_cursor(config: Config, witnesses: WI, constraints: CI) -> Self
pub fn init_cursor(config: Config, witnesses: WI, constraints: CI) -> Self
Initialize the encoder, filling the buffer with required bytes.
Source§impl<W, WI, C, CI, T> Encoder<WI, CI, T>where
W: Borrow<EncodableWitness>,
WI: Iterator<Item = W> + ExactSizeIterator,
C: Borrow<EncodableConstraint>,
CI: Iterator<Item = C> + ExactSizeIterator,
T: Write + Seek,
impl<W, WI, C, CI, T> Encoder<WI, CI, T>where
W: Borrow<EncodableWitness>,
WI: Iterator<Item = W> + ExactSizeIterator,
C: Borrow<EncodableConstraint>,
CI: Iterator<Item = C> + ExactSizeIterator,
T: Write + Seek,
Sourcepub fn write_all<P>(&mut self, provider: P) -> Result<usize>where
P: EncoderContextProvider,
pub fn write_all<P>(&mut self, provider: P) -> Result<usize>where
P: EncoderContextProvider,
Write all witnesses and constraints into the target
Trait Implementations§
Auto Trait Implementations§
impl<WI, CI, T> Freeze for Encoder<WI, CI, T>
impl<WI, CI, T> RefUnwindSafe for Encoder<WI, CI, T>
impl<WI, CI, T> Send for Encoder<WI, CI, T>
impl<WI, CI, T> Sync for Encoder<WI, CI, T>
impl<WI, CI, T> Unpin for Encoder<WI, CI, T>
impl<WI, CI, T> UnwindSafe for Encoder<WI, CI, T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more