pub struct PatternStructuralInfo { /* private fields */ }Expand description
Row bounds and flags derived from one recursive walk over a pattern AST.
This bundles the planner-side properties that are otherwise frequently recomputed independently by row-bounds, anchor checks, exclusion checks, and downstream compilation metadata extraction.
Implementations§
Source§impl PatternStructuralInfo
impl PatternStructuralInfo
Sourcepub fn for_permute(symbols: &[Symbol]) -> Self
pub fn for_permute(symbols: &[Symbol]) -> Self
Structural facts for a PERMUTE(...) sequence.
Sourcepub fn from_concat_children(child_info: &[Self]) -> Self
pub fn from_concat_children(child_info: &[Self]) -> Self
Structural facts for a concatenation computed from child summaries.
Sourcepub fn from_alternation_children(child_info: &[Self]) -> Self
pub fn from_alternation_children(child_info: &[Self]) -> Self
Structural facts for an alternation computed from child summaries.
Sourcepub fn from_repetition_child(
inner_info: Self,
quantifier: &RepetitionQuantifier,
) -> Self
pub fn from_repetition_child( inner_info: Self, quantifier: &RepetitionQuantifier, ) -> Self
Structural facts for a repetition computed from the inner child summary.
Sourcepub const fn min_match_rows(self) -> usize
pub const fn min_match_rows(self) -> usize
Return the structural minimum, saturating at usize::MAX on overflow.
Sourcepub const fn max_match_rows(self) -> Option<usize>
pub const fn max_match_rows(self) -> Option<usize>
Return a structural upper bound, or None if unbounded or larger than usize.
Sourcepub const fn has_anchors(self) -> bool
pub const fn has_anchors(self) -> bool
Returns true when the pattern contains any anchors.
Sourcepub const fn has_exclusions(self) -> bool
pub const fn has_exclusions(self) -> bool
Returns true when the pattern contains any exclusions.
Sourcepub const fn anchored_at_end(self) -> bool
pub const fn anchored_at_end(self) -> bool
Returns true when the pattern is structurally anchored at the end.
Sourcepub const fn can_match_empty(self) -> bool
pub const fn can_match_empty(self) -> bool
Returns true when the pattern can match without consuming any rows.
Trait Implementations§
Source§impl Clone for PatternStructuralInfo
impl Clone for PatternStructuralInfo
impl Copy for PatternStructuralInfo
Source§impl Debug for PatternStructuralInfo
impl Debug for PatternStructuralInfo
impl Eq for PatternStructuralInfo
Source§impl Hash for PatternStructuralInfo
impl Hash for PatternStructuralInfo
Source§impl PartialEq for PatternStructuralInfo
impl PartialEq for PatternStructuralInfo
impl StructuralPartialEq for PatternStructuralInfo
Auto Trait Implementations§
impl Forget for PatternStructuralInfo
impl Freeze for PatternStructuralInfo
impl Move for PatternStructuralInfo
impl RefUnwindSafe for PatternStructuralInfo
impl Send for PatternStructuralInfo
impl Sync for PatternStructuralInfo
impl Unpin for PatternStructuralInfo
impl UnsafeUnpin for PatternStructuralInfo
impl UnwindSafe for PatternStructuralInfo
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more