Skip to main content

SafeToBreakAccel

Struct SafeToBreakAccel 

Source
pub(crate) struct SafeToBreakAccel {
    wouldbe: Vec<u16>,
    eot_tail: Vec<u64>,
}
Expand description

Per-table acceleration for the drive loops’ safe-to-break computation.

The data for every state-machine subtable in one AAT table is stored in two packed vectors. Each top-level subtable cache carries a compact descriptor for its ranges. This avoids two Vec allocations in every subtable cache while retaining O(classes) + O(states) storage.

Fields§

§wouldbe: Vec<u16>§eot_tail: Vec<u64>

Implementations§

Source§

impl SafeToBreakAccel

Source

pub(crate) fn subtable( &self, subtable: SafeToBreakSubtable, ) -> Option<SafeToBreak<'_>>

Returns a view of the acceleration data described by a top-level subtable cache.

Source

pub(crate) fn empty_subtable(&self) -> SafeToBreakSubtable

Describes a subtable that does not contain a state machine.

Source

pub(crate) fn build_extended<T: AnyBitPattern + FixedSize>( &mut self, machine: &ExtendedStateTable<'_, T>, data: &[u8], is_actionable: &dyn Fn(&StateEntry<T>) -> bool, can_advance: &dyn Fn(&StateEntry<T>) -> bool, ) -> SafeToBreakSubtable

Appends the data for an extended state table whose machine starts at the beginning of data. The predicates mirror the subtable kind’s notion of actionable/advancing entries.

Source

pub(crate) fn build_legacy<T: AnyBitPattern + FixedSize>( &mut self, machine: &StateTable<'_, T>, is_actionable: &dyn Fn(&StateEntry<T>) -> bool, can_advance: &dyn Fn(&StateEntry<T>) -> bool, ) -> SafeToBreakSubtable

The legacy (kern Format1) counterpart of Self::build_extended: one-byte state cells and u8 classes.

Trait Implementations§

Source§

impl Default for SafeToBreakAccel

Source§

fn default() -> SafeToBreakAccel

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

Auto Trait Implementations§

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> ErasedDestructor for T
where T: 'static,

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.