Skip to main content

ConstTranscribable

Trait ConstTranscribable 

Source
pub trait ConstTranscribable: GenTranscribable {
    const NUM_BYTES: usize;
    const NUM_BITS: usize = _;
}
Expand description

If number of bytes for Transcribable is known at compile time, there’s no need to read and write them from a buffer.

Required Associated Constants§

Source

const NUM_BYTES: usize

Number of bytes required to represent this type.

Provided Associated Constants§

Source

const NUM_BITS: usize = _

Number of bits actually used to store data.

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

Source§

impl ConstTranscribable for i16

Source§

impl ConstTranscribable for i32

Source§

impl ConstTranscribable for i64

Source§

impl ConstTranscribable for i128

Source§

impl ConstTranscribable for u8

Source§

impl ConstTranscribable for u16

Source§

impl ConstTranscribable for u32

Source§

impl ConstTranscribable for u64

Source§

impl ConstTranscribable for u128

Source§

impl ConstTranscribable for Boolean

Source§

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

Source§

const NUM_BYTES: usize = Uint<LIMBS>::NUM_BYTES

Source§

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

Implementors§