Struct cedar_policy_validator::TypeError
source · pub struct TypeError { /* private fields */ }
Expand description
The structure for type errors. A type errors knows the expression that triggered the type error, as well as additional information for specific kinds of type errors.
Implementations§
source§impl TypeError
impl TypeError
sourcepub fn type_error_kind(self) -> TypeErrorKind
pub fn type_error_kind(self) -> TypeErrorKind
Extract the type error kind for this type error.
sourcepub fn source_location(self) -> Option<SourceInfo>
pub fn source_location(self) -> Option<SourceInfo>
Extract the location of this type error.
sourcepub fn kind_and_location(self) -> (TypeErrorKind, Option<SourceInfo>)
pub fn kind_and_location(self) -> (TypeErrorKind, Option<SourceInfo>)
Deconstruct the type error into its kind and location.
Trait Implementations§
source§impl Error for TypeError
impl Error for TypeError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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()
source§impl PartialEq<TypeError> for TypeError
impl PartialEq<TypeError> for TypeError
impl Eq for TypeError
impl StructuralEq for TypeError
impl StructuralPartialEq for TypeError
Auto Trait Implementations§
impl RefUnwindSafe for TypeError
impl Send for TypeError
impl Sync for TypeError
impl Unpin for TypeError
impl UnwindSafe for TypeError
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.