Skip to main content

GenTranscribable

Trait GenTranscribable 

Source
pub trait GenTranscribable: Sized {
    // Required methods
    fn read_transcription_bytes_exact(bytes: &[u8]) -> Self;
    fn write_transcription_bytes_exact(&self, buf: &mut [u8]);
}
Expand description

Common trait for both Transcribable and ConstTranscribable to avoid code duplication in their implementations.

Required Methods§

Source

fn read_transcription_bytes_exact(bytes: &[u8]) -> Self

Creates a new instance from a byte buffer. The buffer must be exactly the expected length.

Source

fn write_transcription_bytes_exact(&self, buf: &mut [u8])

Transcribes the current instance into a byte buffer. The buffer must be exactly the expected length.

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 GenTranscribable for i8

Source§

impl GenTranscribable for i16

Source§

impl GenTranscribable for i32

Source§

impl GenTranscribable for i64

Source§

impl GenTranscribable for i128

Source§

impl GenTranscribable for u8

Source§

impl GenTranscribable for u16

Source§

impl GenTranscribable for u32

Source§

impl GenTranscribable for u64

Source§

impl GenTranscribable for u128

Source§

impl GenTranscribable for Boolean

Source§

impl GenTranscribable for BoxedUint

Source§

impl<F> GenTranscribable for Vec<F>
where F: PrimeField, F::Inner: ConstTranscribable, F::Modulus: ConstTranscribable,

Source§

impl<const LIMBS: usize> GenTranscribable for Int<LIMBS>

Source§

impl<const LIMBS: usize> GenTranscribable for Uint<LIMBS>

Implementors§