pub struct GRLQueryParser;Expand description
Parser for GRL Query syntax
Implementations§
Source§impl GRLQueryParser
impl GRLQueryParser
Sourcepub fn parse(input: &str) -> Result<GRLQuery, RuleEngineError>
pub fn parse(input: &str) -> Result<GRLQuery, RuleEngineError>
Parse a query from string
§Example
let query_str = r#"
query "CheckVIP" {
goal: User.IsVIP == true
strategy: depth-first
}
"#;
let query = rust_rule_engine::backward::GRLQueryParser::parse(query_str).unwrap();Sourcepub fn parse_queries(input: &str) -> Result<Vec<GRLQuery>, RuleEngineError>
pub fn parse_queries(input: &str) -> Result<Vec<GRLQuery>, RuleEngineError>
Parse multiple queries from a file
Auto Trait Implementations§
impl Freeze for GRLQueryParser
impl RefUnwindSafe for GRLQueryParser
impl Send for GRLQueryParser
impl Sync for GRLQueryParser
impl Unpin for GRLQueryParser
impl UnwindSafe for GRLQueryParser
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