pub struct AuthorizationError {
pub policy_id: PolicyId,
pub error: DetailedError,
}
Expand description
Error (or warning) which occurred in a particular policy during authorization
Fields§
§policy_id: PolicyId
Id of the policy where the error (or warning) occurred
error: DetailedError
Error (or warning).
You can look at the severity
field to see whether it is actually an
error or a warning.
Implementations§
Source§impl AuthorizationError
impl AuthorizationError
Sourcepub fn new(
policy_id: impl Into<PolicyId>,
error: impl Diagnostic + Send + Sync + 'static,
) -> Self
pub fn new( policy_id: impl Into<PolicyId>, error: impl Diagnostic + Send + Sync + 'static, ) -> Self
Create an AuthorizationError
from a policy ID and any miette
error
Sourcepub fn new_from_report(policy_id: impl Into<PolicyId>, report: Report) -> Self
pub fn new_from_report(policy_id: impl Into<PolicyId>, report: Report) -> Self
Create an AuthorizationError
from a policy ID and a miette::Report
Trait Implementations§
Source§impl Clone for AuthorizationError
impl Clone for AuthorizationError
Source§fn clone(&self) -> AuthorizationError
fn clone(&self) -> AuthorizationError
Returns a copy 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 AuthorizationError
impl Debug for AuthorizationError
Source§impl<'de> Deserialize<'de> for AuthorizationError
impl<'de> Deserialize<'de> for AuthorizationError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<AuthorizationError> for AuthorizationError
impl From<AuthorizationError> for AuthorizationError
Source§fn from(e: AuthorizationError) -> Self
fn from(e: AuthorizationError) -> Self
Converts to this type from the input type.
Source§impl Hash for AuthorizationError
impl Hash for AuthorizationError
Source§impl PartialEq for AuthorizationError
impl PartialEq for AuthorizationError
Source§impl Serialize for AuthorizationError
impl Serialize for AuthorizationError
impl Eq for AuthorizationError
impl StructuralPartialEq for AuthorizationError
Auto Trait Implementations§
impl Freeze for AuthorizationError
impl RefUnwindSafe for AuthorizationError
impl Send for AuthorizationError
impl Sync for AuthorizationError
impl Unpin for AuthorizationError
impl UnwindSafe for AuthorizationError
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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