pub struct RuleContext<'a> {
pub segment: &'a Segment,
pub parent: Option<&'a Segment>,
pub root: &'a Segment,
pub siblings: &'a [Segment],
pub index_in_parent: usize,
pub source: &'a str,
pub dialect: &'a str,
}Expand description
Context passed to a rule during evaluation.
Fields§
§segment: &'a SegmentThe segment being evaluated.
parent: Option<&'a Segment>The parent segment (if any).
root: &'a SegmentThe root file segment.
siblings: &'a [Segment]Direct children of the parent, for sibling access.
index_in_parent: usizeIndex of segment within siblings.
source: &'a strFull source text.
dialect: &'a strSQL dialect name (e.g. “ansi”, “postgres”, “tsql”).
Auto Trait Implementations§
impl<'a> Freeze for RuleContext<'a>
impl<'a> RefUnwindSafe for RuleContext<'a>
impl<'a> Send for RuleContext<'a>
impl<'a> Sync for RuleContext<'a>
impl<'a> Unpin for RuleContext<'a>
impl<'a> UnsafeUnpin for RuleContext<'a>
impl<'a> UnwindSafe for RuleContext<'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