pub struct SourceSyntax { /* private fields */ }Expand description
A data-structure representing an egglog query. Essentially, multiple SourceExprs, one per
line, along with a backing store accounting for subterms indexed by [`SyntaxId].
Implementations§
Source§impl SourceSyntax
 
impl SourceSyntax
Sourcepub fn add_expr(&mut self, expr: SourceExpr) -> SyntaxId
 
pub fn add_expr(&mut self, expr: SourceExpr) -> SyntaxId
Add expr to the known syntax of the SourceSyntax.
The returned [SyntaxId] can be used to construct another SourceExpr or a
TopLevelLhsExpr.
Sourcepub fn add_toplevel_expr(&mut self, expr: TopLevelLhsExpr)
 
pub fn add_toplevel_expr(&mut self, expr: TopLevelLhsExpr)
Add expr to the toplevel representation of the syntax.
Trait Implementations§
Source§impl Clone for SourceSyntax
 
impl Clone for SourceSyntax
Source§fn clone(&self) -> SourceSyntax
 
fn clone(&self) -> SourceSyntax
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from 
source. Read moreSource§impl Debug for SourceSyntax
 
impl Debug for SourceSyntax
Source§impl Default for SourceSyntax
 
impl Default for SourceSyntax
Source§fn default() -> SourceSyntax
 
fn default() -> SourceSyntax
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SourceSyntax
impl RefUnwindSafe for SourceSyntax
impl Send for SourceSyntax
impl Sync for SourceSyntax
impl Unpin for SourceSyntax
impl UnwindSafe for SourceSyntax
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
Source§impl<T> CloneToUninit for Twhere
    T: Clone,
 
impl<T> CloneToUninit for Twhere
    T: Clone,
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>
Converts 
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>
Converts 
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