pub(crate) struct VM<'a, T: Debug> {
pub reader: MemReaderRef<'a>,
pub data: Vec<T>,
pub stack: Vec<u64>,
pub strs: Vec<T>,
pub vars: HashMap<T, T>,
pub flags: HashMap<T, bool>,
pub mess: BTreeSet<T>,
pub names: HashMap<T, T>,
}
Available on crate feature
escude
only.Fields§
§reader: MemReaderRef<'a>
§data: Vec<T>
§stack: Vec<u64>
§strs: Vec<T>
§vars: HashMap<T, T>
§flags: HashMap<T, bool>
§mess: BTreeSet<T>
§names: HashMap<T, T>
Implementations§
Source§impl<'a, T> VM<'a, T>where
MemReaderRef<'a>: ReadParam<T>,
T: TryInto<u64> + Default + Eq + Ord + Copy + Debug + Display + Hash + From<u8> + Neg<Output = T> + Add<Output = T> + Sub<Output = T> + Mul<Output = T> + Div<Output = T> + Rem<Output = T> + Not<Output = T> + BitAnd<Output = T> + BitOr<Output = T> + BitXor<Output = T> + Shr<Output = T> + Shl<Output = T>,
Error: From<<T as TryInto<u64>>::Error>,
impl<'a, T> VM<'a, T>where
MemReaderRef<'a>: ReadParam<T>,
T: TryInto<u64> + Default + Eq + Ord + Copy + Debug + Display + Hash + From<u8> + Neg<Output = T> + Add<Output = T> + Sub<Output = T> + Mul<Output = T> + Div<Output = T> + Rem<Output = T> + Not<Output = T> + BitAnd<Output = T> + BitOr<Output = T> + BitXor<Output = T> + Shr<Output = T> + Shl<Output = T>,
Error: From<<T as TryInto<u64>>::Error>,
pub fn new(data: &'a [u8]) -> Self
pub fn pop_data(&mut self) -> Result<T>
fn pop_stack(&mut self) -> Result<u64>
pub fn run(&mut self, custom_ops: Option<Box<dyn CustomOps<T>>>) -> Result<()>
pub fn skip_n_params(&mut self, n: u64, nbreak: bool) -> Result<bool>
pub fn skip_params(&mut self, nbreak: bool) -> Result<bool>
pub fn read_params(&mut self, ncount: Option<u64>) -> Result<Vec<T>>
Trait Implementations§
Auto Trait Implementations§
impl<'a, T> Freeze for VM<'a, T>
impl<'a, T> RefUnwindSafe for VM<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for VM<'a, T>where
T: Send,
impl<'a, T> Sync for VM<'a, T>where
T: Sync,
impl<'a, T> Unpin for VM<'a, T>where
T: Unpin,
impl<'a, T> UnwindSafe for VM<'a, T>where
T: UnwindSafe + RefUnwindSafe,
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more