Skip to main content

RarVM

Struct RarVM 

Source
pub struct RarVM { /* private fields */ }
Expand description

RAR VM state

Implementations§

Source§

impl RarVM

Source

pub fn new() -> Self

Source

pub fn reset(&mut self)

Reset VM state

Source

pub fn add_code(&mut self, first_byte: u8, code: &[u8]) -> bool

Add VM code and create filter

Source

pub fn has_pending_filters(&self) -> bool

Check if there are pending filters

Source

pub fn next_filter_pos(&self) -> Option<u32>

Get the next filter’s block start position

Source

pub fn execute_filters( &mut self, window: &mut [u8], write_pos: u32, ) -> Option<(usize, usize)>

Execute pending filters on the output window

Trait Implementations§

Source§

impl Default for RarVM

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Freeze for RarVM

§

impl RefUnwindSafe for RarVM

§

impl Send for RarVM

§

impl Sync for RarVM

§

impl Unpin for RarVM

§

impl UnwindSafe for RarVM

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.