pub struct GateBuilder { /* private fields */ }Expand description
Builds a Gate by registering checks in evaluation order.
Implementations§
Source§impl GateBuilder
impl GateBuilder
Sourcepub fn check<C: Check + 'static>(self, check: C) -> Self
pub fn check<C: Check + 'static>(self, check: C) -> Self
Register a check. Checks evaluate in the order they are registered.
Sourcepub fn check_boxed(self, check: Box<dyn Check>) -> Self
pub fn check_boxed(self, check: Box<dyn Check>) -> Self
Register a pre-boxed check (for dynamically-assembled check sets).
Sourcepub fn build_deny_by_default(self) -> Gate
pub fn build_deny_by_default(self) -> Gate
Register DenyByDefault as the terminal check and finish building:
the gate denies any action no earlier check decides.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for GateBuilder
impl !UnwindSafe for GateBuilder
impl Freeze for GateBuilder
impl Send for GateBuilder
impl Sync for GateBuilder
impl Unpin for GateBuilder
impl UnsafeUnpin for GateBuilder
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