Encode

Trait Encode 

Source
pub trait Encode<T> {
    // Required method
    fn encode(&self) -> Vec<T>;

    // Provided methods
    fn len(&self) -> usize { ... }
    fn is_empty(&self) -> bool { ... }
}
Expand description

Trait for things that can be converted to sequences (of bytes, words, etc)

Required Methods§

Source

fn encode(&self) -> Vec<T>

Return the encoding

Provided Methods§

Source

fn len(&self) -> usize

Return the length of the encoding

Source

fn is_empty(&self) -> bool

Returns true if encode() would return an empty vector, false otherwise

Implementors§

Source§

impl Encode<u8> for strop::armv4t::isa::Insn

Source§

impl Encode<u8> for strop::m6809::Insn

Source§

impl Encode<u8> for strop::mips::Insn

Source§

impl Encode<u8> for strop::z80::Insn

Source§

impl Encode<u32> for strop::armv4t::isa::Insn

Source§

impl<T, U> Encode<U> for Sequence<T>
where T: Encode<U>,

Source§

impl<V: Variant> Encode<u8> for strop::m6502::Insn<V>