Struct InputFunctions

Source
pub struct InputFunctions {
    prepare_input: FunctionIdx,
    pub assert_input_args_wf: FunctionIdx,
    pub utf8_is_boundary: Option<FunctionIdx>,
    pub start_config: FunctionIdx,
}
Expand description

Holds indices to WebAssembly functions related to input processing.

These functions are used by the compiled regex to manage and interpret the input haystack.

Fields§

§prepare_input: FunctionIdx§assert_input_args_wf: FunctionIdx§utf8_is_boundary: Option<FunctionIdx>§start_config: FunctionIdx

Implementations§

Source§

impl InputFunctions

Source

pub fn new( ctx: &mut CompileContext, input_layout: &InputLayout, pattern_lookup_start: FunctionIdx, ) -> Self

Creates and registers the necessary WebAssembly functions for input handling.

This includes functions for preparing input memory, asserting argument well-formedness, checking UTF-8 boundaries, and configuring start conditions.

Source

fn start_config_fn( nfa: &NFA, pattern_lookup_start: FunctionIdx, pattern_lookup_start_result_block_sig: TypeIdx, ) -> Function

Source

fn utf8_is_boundary_fn() -> Function

Source

fn assert_input_args_wf_fn( page_size: usize, input_layout: &InputLayout, ) -> Function

Source

fn prepare_input_fn(page_size: usize, input_layout: &InputLayout) -> Function

Trait Implementations§

Source§

impl Debug for InputFunctions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. 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> 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.