Struct biscuit_auth::builder::Policy
source · pub struct Policy {
pub queries: Vec<Rule>,
pub kind: PolicyKind,
}Expand description
Builder for a Biscuit policy
Fields§
§queries: Vec<Rule>§kind: PolicyKindImplementations§
source§impl Policy
impl Policy
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
pub fn set_inner(&mut self, name: &str, term: Term) -> Result<(), Token>
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, ignoring unknown parameters
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 pubkey argument, ignoring unknown parameters