pub enum DenialBehavior {
NotFound,
Unauthorized,
Custom(Arc<dyn Fn(&str) -> Error + Send + Sync>),
}Expand description
Behavior when a filtered capability is accessed directly.
Variants§
NotFound
Return “method not found” error - don’t reveal the capability exists. This is the default and recommended for security.
Return an “unauthorized” error, revealing the capability exists.
Custom(Arc<dyn Fn(&str) -> Error + Send + Sync>)
Use a custom error generator.
Implementations§
Trait Implementations§
Source§impl Clone for DenialBehavior
impl Clone for DenialBehavior
Source§fn clone(&self) -> DenialBehavior
fn clone(&self) -> DenialBehavior
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 Debug for DenialBehavior
impl Debug for DenialBehavior
Source§impl Default for DenialBehavior
impl Default for DenialBehavior
Source§fn default() -> DenialBehavior
fn default() -> DenialBehavior
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DenialBehavior
impl !RefUnwindSafe for DenialBehavior
impl Send for DenialBehavior
impl Sync for DenialBehavior
impl Unpin for DenialBehavior
impl !UnwindSafe for DenialBehavior
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