pub struct SparseSetLayout {
dense_layout: Layout,
dense_stride: usize,
sparse_layout: Layout,
sparse_stride: usize,
pub set_overall: Layout,
pub set_start_pos: usize,
sparse_array_offset: usize,
state_id_layout: Layout,
}
Expand description
This struct describes the layout of a “sparse set”, which is used to track NFA state ID membership.
This type has methods which will generate WASM functions that operate on the set in WASM memory.
Fields§
§dense_layout: Layout
§dense_stride: usize
§sparse_layout: Layout
§sparse_stride: usize
§set_overall: Layout
§set_start_pos: usize
§sparse_array_offset: usize
§state_id_layout: Layout
Implementations§
Source§impl SparseSetLayout
impl SparseSetLayout
Sourcepub fn new(
ctx: &mut CompileContext,
overall: Layout,
) -> Result<(Layout, Self), LayoutError>
pub fn new( ctx: &mut CompileContext, overall: Layout, ) -> Result<(Layout, Self), LayoutError>
Create a new sparse set layout for the given NFA
.
The sparse set will be scaled to the number of states in the NFA.
fn with_num_states( num_states: usize, overall: Layout, state_id_layout: &Layout, ) -> Result<(Layout, Self), LayoutError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SparseSetLayout
impl RefUnwindSafe for SparseSetLayout
impl Send for SparseSetLayout
impl Sync for SparseSetLayout
impl Unpin for SparseSetLayout
impl UnwindSafe for SparseSetLayout
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