Struct biscuit_auth::builder::Check
source · pub struct Check {
pub queries: Vec<Rule>,
pub kind: CheckKind,
}Expand description
Builder for a Biscuit check
Fields§
§queries: Vec<Rule>§kind: CheckKindImplementations§
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