pub struct UnsafeInstDecoder<'a> { /* private fields */ }Expand description
All of the unsafe methods of this type depend on the bytecode being previously validated and instructions being processed correctly. It should not be used outside of the bytecode interpreter.
Implementations§
Source§impl<'a> UnsafeInstDecoder<'a>
impl<'a> UnsafeInstDecoder<'a>
pub fn new(bytecode: &'a [u8]) -> Self
Sourcepub unsafe fn opcode(&mut self) -> Opcode
pub unsafe fn opcode(&mut self) -> Opcode
§Safety
Current offset must be in bounds and at valid opcode
Sourcepub unsafe fn uvar(&mut self) -> u64
pub unsafe fn uvar(&mut self) -> u64
§Safety
Current offset must at valid unsigned integer within bounds
Sourcepub unsafe fn ivar(&mut self) -> i64
pub unsafe fn ivar(&mut self) -> i64
§Safety
Current offset must at valid signed integer within bounds
Sourcepub unsafe fn usize(&mut self) -> usize
pub unsafe fn usize(&mut self) -> usize
§Safety
Current offset must at valid unsigned integer within bounds that fits in usize
Sourcepub unsafe fn isize(&mut self) -> isize
pub unsafe fn isize(&mut self) -> isize
§Safety
Current offset must at valid signed integer within bounds that fits in isize
Sourcepub unsafe fn seek(&mut self, offset: isize)
pub unsafe fn seek(&mut self, offset: isize)
§Safety
Target offset must be the start of an in-bounds instruction
pub fn offset(&self) -> usize
Auto Trait Implementations§
impl<'a> Freeze for UnsafeInstDecoder<'a>
impl<'a> RefUnwindSafe for UnsafeInstDecoder<'a>
impl<'a> !Send for UnsafeInstDecoder<'a>
impl<'a> !Sync for UnsafeInstDecoder<'a>
impl<'a> Unpin for UnsafeInstDecoder<'a>
impl<'a> UnsafeUnpin for UnsafeInstDecoder<'a>
impl<'a> UnwindSafe for UnsafeInstDecoder<'a>
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