pub struct Check {
pub queries: Vec<Rule>,
pub kind: CheckKind,
}
Expand description
Builder for a Biscuit check
Fields§
§queries: Vec<Rule>
§kind: CheckKind
Implementations§
Source§impl Check
impl Check
Sourcepub fn set<T: Into<Term>>(&mut self, name: &str, term: T) -> Result<(), Token>
pub fn set<T: Into<Term>>(&mut self, name: &str, term: T) -> Result<(), Token>
replace a parameter with the term argument
Sourcepub fn set_scope(&mut self, name: &str, pubkey: PublicKey) -> Result<(), Token>
pub fn set_scope(&mut self, name: &str, pubkey: PublicKey) -> Result<(), Token>
replace a scope parameter with the pubkey argument
Sourcepub fn set_lenient<T: Into<Term>>(
&mut self,
name: &str,
term: T,
) -> Result<(), Token>
pub fn set_lenient<T: Into<Term>>( &mut self, name: &str, term: T, ) -> Result<(), Token>
replace a parameter with the term argument, without raising an error if the parameter is not present in the check
Sourcepub fn set_scope_lenient(
&mut self,
name: &str,
pubkey: PublicKey,
) -> Result<(), Token>
pub fn set_scope_lenient( &mut self, name: &str, pubkey: PublicKey, ) -> Result<(), Token>
replace a scope parameter with the term argument, without raising an error if the parameter is not present in the check
pub fn set_macro_param<T: ToAnyParam>( &mut self, name: &str, param: T, ) -> Result<(), Token>
pub fn validate_parameters(&self) -> Result<(), Token>
Trait Implementations§
Source§impl Convert<Check> for Check
impl Convert<Check> for Check
fn convert(&self, symbols: &mut SymbolTable) -> Check
fn convert_from(r: &Check, symbols: &SymbolTable) -> Result<Self, Format>
fn translate( f: &T, from_symbols: &SymbolTable, to_symbols: &mut SymbolTable, ) -> Result<T, Format>
impl Eq for Check
impl StructuralPartialEq for Check
Auto Trait Implementations§
impl Freeze for Check
impl RefUnwindSafe for Check
impl Send for Check
impl Sync for Check
impl Unpin for Check
impl UnwindSafe for Check
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