pub struct BiscuitBuilder { /* private fields */ }Expand description
creates a Biscuit
Implementations§
Source§impl BiscuitBuilder
impl BiscuitBuilder
pub fn new() -> BiscuitBuilder
pub fn merge(self, other: BlockBuilder) -> Self
pub fn fact<F: TryInto<Fact>>(self, fact: F) -> Result<Self, Token>
pub fn rule<Ru: TryInto<Rule>>(self, rule: Ru) -> Result<Self, Token>
pub fn check<C: TryInto<Check>>(self, check: C) -> Result<Self, Token>
pub fn code<T: AsRef<str>>(self, source: T) -> Result<Self, Token>
pub fn code_with_params<T: AsRef<str>>( self, source: T, params: HashMap<String, Term>, scope_params: HashMap<String, PublicKey>, ) -> Result<Self, Token>
pub fn scope(self, scope: Scope) -> Self
pub fn context(self, context: String) -> Self
pub fn root_key_id(self, root_key_id: u32) -> Self
Sourcepub fn dump(&self) -> (Vec<Fact>, Vec<Rule>, Vec<Check>)
pub fn dump(&self) -> (Vec<Fact>, Vec<Rule>, Vec<Check>)
returns all of the datalog loaded in the biscuit builder
pub fn dump_code(&self) -> String
pub fn build(self, root_key: &KeyPair) -> Result<Biscuit, Token>
pub fn build_with_symbols( self, root_key: &KeyPair, symbols: SymbolTable, ) -> Result<Biscuit, Token>
pub fn build_with_rng<R: RngCore + CryptoRng>( self, root: &KeyPair, symbols: SymbolTable, rng: &mut R, ) -> Result<Biscuit, Token>
pub fn build_with_key_pair( self, root: &KeyPair, symbols: SymbolTable, next: &KeyPair, ) -> Result<Biscuit, Token>
Trait Implementations§
Source§impl BuilderExt for BiscuitBuilder
impl BuilderExt for BiscuitBuilder
fn resource(self, name: &str) -> Self
fn check_resource(self, name: &str) -> Self
fn check_resource_prefix(self, prefix: &str) -> Self
fn check_resource_suffix(self, suffix: &str) -> Self
fn operation(self, name: &str) -> Self
fn check_operation(self, name: &str) -> Self
fn check_expiration_date(self, date: SystemTime) -> Self
Source§impl Clone for BiscuitBuilder
impl Clone for BiscuitBuilder
Source§fn clone(&self) -> BiscuitBuilder
fn clone(&self) -> BiscuitBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for BiscuitBuilder
impl Default for BiscuitBuilder
Source§fn default() -> BiscuitBuilder
fn default() -> BiscuitBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BiscuitBuilder
impl RefUnwindSafe for BiscuitBuilder
impl Send for BiscuitBuilder
impl Sync for BiscuitBuilder
impl Unpin for BiscuitBuilder
impl UnwindSafe for BiscuitBuilder
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