pub struct RegexView<'a> { /* private fields */ }Expand description
View into the regex table for lazy DFA lookup.
Table format per entry: string_id (u16) | reserved (u16) | offset (u32) = 8 bytes.
This allows access to both the pattern string (via StringTable) and DFA bytes.
Implementations§
Source§impl<'a> RegexView<'a>
impl<'a> RegexView<'a>
Sourcepub fn get_by_index(&self, idx: usize) -> &'a [u8] ⓘ
pub fn get_by_index(&self, idx: usize) -> &'a [u8] ⓘ
Get regex DFA bytes by index.
Returns the raw DFA bytes for the regex at the given index.
Use regex-automata to deserialize: DFA::from_bytes(&bytes).
Sourcepub fn get_string_id(&self, idx: usize) -> StringId
pub fn get_string_id(&self, idx: usize) -> StringId
Get the StringId of the pattern for a regex by index.
This allows looking up the pattern text from StringTable for display.
Auto Trait Implementations§
impl<'a> Freeze for RegexView<'a>
impl<'a> RefUnwindSafe for RegexView<'a>
impl<'a> Send for RegexView<'a>
impl<'a> Sync for RegexView<'a>
impl<'a> Unpin for RegexView<'a>
impl<'a> UnwindSafe for RegexView<'a>
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