pub struct LineNode<'a> {
pub pair: Pair<'a, Rule>,
pub line_no: i64,
pub children: Vec<LineNode<'a>>,
}
Expand description
Represents a line in the Plan
tree structure before it’s converted to a
relation. This allows us to build the tree structure first, then convert to
relations with proper parent-child relationships.
Fields§
§pair: Pair<'a, Rule>
§line_no: i64
§children: Vec<LineNode<'a>>
Implementations§
Source§impl<'a> LineNode<'a>
impl<'a> LineNode<'a>
pub fn context(&self) -> ParseContext
pub fn parse(line: &'a str, line_no: i64) -> Result<Self, ParseError>
Sourcepub fn parse_root(line: &'a str, line_no: i64) -> Result<Self, ParseError>
pub fn parse_root(line: &'a str, line_no: i64) -> Result<Self, ParseError>
Parse the root relation of a plan, at depth 0.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for LineNode<'a>
impl<'a> RefUnwindSafe for LineNode<'a>
impl<'a> !Send for LineNode<'a>
impl<'a> !Sync for LineNode<'a>
impl<'a> Unpin for LineNode<'a>
impl<'a> UnwindSafe for LineNode<'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