Struct biscuit_auth::datalog::Rule
source · pub struct Rule {
pub head: Predicate,
pub body: Vec<Predicate>,
pub expressions: Vec<Expression>,
pub scopes: Vec<Scope>,
}Fields§
§head: Predicate§body: Vec<Predicate>§expressions: Vec<Expression>§scopes: Vec<Scope>Implementations§
source§impl Rule
impl Rule
pub fn apply<'a, IT>( &'a self, facts: IT, rule_origin: usize, symbols: &'a SymbolTable ) -> impl Iterator<Item = Result<(Origin, Fact), Expression>> + 'a
pub fn find_match( &self, facts: &FactSet, origin: usize, scope: &TrustedOrigins, symbols: &SymbolTable ) -> Result<bool, Execution>
pub fn check_match_all( &self, facts: &FactSet, scope: &TrustedOrigins, symbols: &SymbolTable ) -> Result<bool, Execution>
pub fn translate( &self, origin_symbols: &SymbolTable, target_symbols: &mut SymbolTable ) -> Result<Self, Format>
pub fn validate_variables(&self, symbols: &SymbolTable) -> Result<(), String>
Trait Implementations§
source§impl Convert<Rule> for Rule
impl Convert<Rule> for Rule
fn convert(&self, symbols: &mut SymbolTable) -> Rule
fn convert_from(r: &Rule, symbols: &SymbolTable) -> Result<Self, Format>
fn translate( f: &T, from_symbols: &SymbolTable, to_symbols: &mut SymbolTable ) -> Result<T, Format>
source§impl PartialEq for Rule
impl PartialEq for Rule
impl Eq for Rule
impl StructuralPartialEq for Rule
Auto Trait Implementations§
impl RefUnwindSafe for Rule
impl Send for Rule
impl Sync for Rule
impl Unpin for Rule
impl UnwindSafe for Rule
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