pub struct Denied {
pub object: Option<Cow<'static, str>>,
pub action: Option<Cow<'static, str>>,
/* private fields */
}Expand description
Authorization failure. Never retried, always audited.
Fields§
§object: Option<Cow<'static, str>>§action: Option<Cow<'static, str>>Implementations§
Source§impl Denied
impl Denied
pub fn new() -> Denied
pub fn from_error(e: impl Error + Send + Sync + 'static) -> Denied
pub fn with_object(self, object: impl Into<Cow<'static, str>>) -> Denied
pub fn with_action(self, action: impl Into<Cow<'static, str>>) -> Denied
pub fn with_source(self, e: impl Error + Send + Sync + 'static) -> Denied
pub fn with_context(self, c: impl Into<Cow<'static, str>>) -> Denied
pub fn context(&self) -> Option<&str>
pub fn source_arc(&self) -> Option<&Arc<dyn Error + Sync + Send>>
Trait Implementations§
Source§impl Error for Denied
impl Error for Denied
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for Denied
impl !UnwindSafe for Denied
impl Freeze for Denied
impl Send for Denied
impl Sync for Denied
impl Unpin for Denied
impl UnsafeUnpin for Denied
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more