pub enum CedarError {
PolicyParse(String),
SchemaParse(String),
PolicyLoad(String),
Validation(String),
EntityBuildFailed(String),
Evaluation(String),
Config(String),
Io(Error),
PolicySet(String),
}Expand description
Cedar-specific error type
Variants§
PolicyParse(String)
Failed to parse a Cedar policy
SchemaParse(String)
Failed to parse the Cedar schema
PolicyLoad(String)
Failed to load policies from file/directory
Validation(String)
Failed to validate policies against schema
EntityBuildFailed(String)
Failed to build Cedar entities
Evaluation(String)
Authorization evaluation error
Config(String)
Configuration error
Io(Error)
IO error
PolicySet(String)
Cedar policy set error
Implementations§
Source§impl CedarError
HTTP status code mapping for Cedar errors
impl CedarError
HTTP status code mapping for Cedar errors
Sourcepub fn status_code(&self) -> u16
pub fn status_code(&self) -> u16
Get the HTTP status code for this error
Trait Implementations§
Source§impl Debug for CedarError
impl Debug for CedarError
Source§impl Display for CedarError
impl Display for CedarError
Source§impl Error for CedarError
impl Error for CedarError
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 CedarError
impl !UnwindSafe for CedarError
impl Freeze for CedarError
impl Send for CedarError
impl Sync for CedarError
impl Unpin for CedarError
impl UnsafeUnpin for CedarError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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