Skip to main content

InstructionCollectionExt

Trait InstructionCollectionExt 

Source
pub trait InstructionCollectionExt<I: Instruction> {
    // Required methods
    fn to_bytes(&self) -> Vec<u8> ;
    fn total_size(&self) -> usize;
}
Expand description

Trait extension for instruction collections This allows you to call .to_bytes() and .total_size() directly on slices and vectors

Required Methods§

Source

fn to_bytes(&self) -> Vec<u8>

Convert instructions to a single byte vector

Source

fn total_size(&self) -> usize

Get the total size in bytes of all instructions

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<I: Instruction> InstructionCollectionExt<I> for [I]

Source§

impl<I: Instruction> InstructionCollectionExt<I> for Vec<I>

Implementors§