Struct rydis::RydisState
source · pub struct RydisState { /* private fields */ }Expand description
a structure which encapsulates information required for encoding/decoding instructions.
Implementations§
source§impl RydisState
impl RydisState
sourcepub fn new(machine_mode: MachineMode, stack_width: StackWidth) -> Result<Self>
pub fn new(machine_mode: MachineMode, stack_width: StackWidth) -> Result<Self>
creates a new state with the given arguments.
sourcepub fn encode(&self, instruction: Instruction) -> Result<EncodedInstructionBuf>
pub fn encode(&self, instruction: Instruction) -> Result<EncodedInstructionBuf>
encodes the given instruction.
sourcepub fn decode_one(&self, buf: &[u8]) -> Result<DecodedInstruction>
pub fn decode_one(&self, buf: &[u8]) -> Result<DecodedInstruction>
decodes a single instruction from the given buffer.
sourcepub fn decode_iter<'a>(&self, buf: &'a [u8]) -> DecodeIter<'a> ⓘ
pub fn decode_iter<'a>(&self, buf: &'a [u8]) -> DecodeIter<'a> ⓘ
returns an iterator which decodes instructions from the given buffer.
Trait Implementations§
source§impl Clone for RydisState
impl Clone for RydisState
source§fn clone(&self) -> RydisState
fn clone(&self) -> RydisState
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for RydisState
impl Debug for RydisState
impl Copy for RydisState
Auto Trait Implementations§
impl RefUnwindSafe for RydisState
impl Send for RydisState
impl Sync for RydisState
impl Unpin for RydisState
impl UnwindSafe for RydisState
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