#[non_exhaustive]pub enum PstConstructionError {
Show 15 variants
PolicyMissingLinkId(PolicyMissingLinkIdError),
ActionConstraintCannotHaveSlots(ActionConstraintCannotHaveSlotsError),
ExpectedTemplateWithSlots(ExpectedTemplateWithSlotsError),
WrongSlotPosition(WrongSlotPositionError),
DuplicateRecordKey(DuplicateRecordKeyError),
InvalidAnnotation(InvalidAnnotationError),
InvalidEntityUid(InvalidEntityUidError),
InvalidEntityType(InvalidEntityTypeError),
InvalidExpression(InvalidExpressionError),
UnknownFunction(UnknownFunctionError),
WrongArity(WrongArityError),
UnsupportedErrorNode(UnsupportedErrorNode),
ParsingFailed(ParsingFailedError),
LinkingFailed(LinkingError),
ContainsSlots(ContainsSlotError),
}Expand description
Errors that can occur during PST construction or conversion
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
PolicyMissingLinkId(PolicyMissingLinkIdError)
A policy is a linked policy but no link id has been provided
ActionConstraintCannotHaveSlots(ActionConstraintCannotHaveSlotsError)
Action constraints cannot contain template slots
ExpectedTemplateWithSlots(ExpectedTemplateWithSlotsError)
Expected a template with slots, but found a static policy
WrongSlotPosition(WrongSlotPositionError)
Slot occurs in the wrong position (e.g., principal slot in resource)
DuplicateRecordKey(DuplicateRecordKeyError)
Duplicate key found in a record literal
InvalidAnnotation(InvalidAnnotationError)
Invalid annotation in a policy or template
InvalidEntityUid(InvalidEntityUidError)
Invalid entity UID format or structure
InvalidEntityType(InvalidEntityTypeError)
Invalid entity type name
InvalidExpression(InvalidExpressionError)
A generic invalid expression error with a description
UnknownFunction(UnknownFunctionError)
Unknown function name (not a built-in or registered extension function)
WrongArity(WrongArityError)
Function called with wrong number of arguments
UnsupportedErrorNode(UnsupportedErrorNode)
Error nodes from parsing are not supported in PST conversion
ParsingFailed(ParsingFailedError)
A parsing error occurred, usually in names
LinkingFailed(LinkingError)
A linking error occurred.
ContainsSlots(ContainsSlotError)
Contains unexpected slots
Trait Implementations§
Source§impl Clone for PstConstructionError
impl Clone for PstConstructionError
Source§fn clone(&self) -> PstConstructionError
fn clone(&self) -> PstConstructionError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PstConstructionError
impl Debug for PstConstructionError
Source§impl Diagnostic for PstConstructionError
impl Diagnostic for PstConstructionError
Source§fn code(&self) -> Option<Box<dyn Display + '_>>
fn code(&self) -> Option<Box<dyn Display + '_>>
Diagnostic. Ideally also globally unique, and documented
in the toplevel crate’s documentation for easy searching. Rust path
format (foo::bar::baz) is recommended, but more classic codes like
E0123 or enums will work just fine.Source§fn help(&self) -> Option<Box<dyn Display + '_>>
fn help(&self) -> Option<Box<dyn Display + '_>>
Diagnostic. Do you have any
advice for the poor soul who’s just run into this issue?Source§fn severity(&self) -> Option<Severity>
fn severity(&self) -> Option<Severity>
ReportHandlers to change the display format
of this diagnostic. Read moreSource§fn labels(&self) -> Option<Box<dyn Iterator<Item = LabeledSpan> + '_>>
fn labels(&self) -> Option<Box<dyn Iterator<Item = LabeledSpan> + '_>>
Diagnostic’s Diagnostic::source_codeSource§fn source_code(&self) -> Option<&dyn SourceCode>
fn source_code(&self) -> Option<&dyn SourceCode>
Diagnostic’s Diagnostic::labels to.Diagnostics.Source§fn url(&self) -> Option<Box<dyn Display + '_>>
fn url(&self) -> Option<Box<dyn Display + '_>>
Diagnostic.Source§fn diagnostic_source(&self) -> Option<&dyn Diagnostic>
fn diagnostic_source(&self) -> Option<&dyn Diagnostic>
Source§impl Display for PstConstructionError
impl Display for PstConstructionError
Source§impl Error for PstConstructionError
impl Error for PstConstructionError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<ActionConstraintCannotHaveSlotsError> for PstConstructionError
impl From<ActionConstraintCannotHaveSlotsError> for PstConstructionError
Source§fn from(source: ActionConstraintCannotHaveSlotsError) -> PstConstructionError
fn from(source: ActionConstraintCannotHaveSlotsError) -> PstConstructionError
Source§impl From<ContainsSlotError> for PstConstructionError
impl From<ContainsSlotError> for PstConstructionError
Source§fn from(source: ContainsSlotError) -> PstConstructionError
fn from(source: ContainsSlotError) -> PstConstructionError
Source§impl From<DuplicateRecordKeyError> for PstConstructionError
impl From<DuplicateRecordKeyError> for PstConstructionError
Source§fn from(source: DuplicateRecordKeyError) -> PstConstructionError
fn from(source: DuplicateRecordKeyError) -> PstConstructionError
Source§impl From<ExpectedTemplateWithSlotsError> for PstConstructionError
impl From<ExpectedTemplateWithSlotsError> for PstConstructionError
Source§fn from(source: ExpectedTemplateWithSlotsError) -> PstConstructionError
fn from(source: ExpectedTemplateWithSlotsError) -> PstConstructionError
Source§impl From<InvalidAnnotationError> for PstConstructionError
impl From<InvalidAnnotationError> for PstConstructionError
Source§fn from(source: InvalidAnnotationError) -> PstConstructionError
fn from(source: InvalidAnnotationError) -> PstConstructionError
Source§impl From<InvalidEntityTypeError> for PstConstructionError
impl From<InvalidEntityTypeError> for PstConstructionError
Source§fn from(source: InvalidEntityTypeError) -> PstConstructionError
fn from(source: InvalidEntityTypeError) -> PstConstructionError
Source§impl From<InvalidEntityUidError> for PstConstructionError
impl From<InvalidEntityUidError> for PstConstructionError
Source§fn from(source: InvalidEntityUidError) -> PstConstructionError
fn from(source: InvalidEntityUidError) -> PstConstructionError
Source§impl From<InvalidExpressionError> for PstConstructionError
impl From<InvalidExpressionError> for PstConstructionError
Source§fn from(source: InvalidExpressionError) -> PstConstructionError
fn from(source: InvalidExpressionError) -> PstConstructionError
Source§impl From<LinkingError> for PstConstructionError
impl From<LinkingError> for PstConstructionError
Source§fn from(source: LinkingError) -> PstConstructionError
fn from(source: LinkingError) -> PstConstructionError
Source§impl From<ParsingFailedError> for PstConstructionError
impl From<ParsingFailedError> for PstConstructionError
Source§fn from(source: ParsingFailedError) -> PstConstructionError
fn from(source: ParsingFailedError) -> PstConstructionError
Source§impl From<PolicyMissingLinkIdError> for PstConstructionError
impl From<PolicyMissingLinkIdError> for PstConstructionError
Source§fn from(source: PolicyMissingLinkIdError) -> PstConstructionError
fn from(source: PolicyMissingLinkIdError) -> PstConstructionError
Source§impl From<PstConstructionError> for PolicySetError
impl From<PstConstructionError> for PolicySetError
Source§fn from(source: PstConstructionError) -> Self
fn from(source: PstConstructionError) -> Self
Source§impl From<PstConstructionError> for PolicyToJsonError
impl From<PstConstructionError> for PolicyToJsonError
Source§fn from(e: PstConstructionError) -> Self
fn from(e: PstConstructionError) -> Self
Source§impl From<UnknownFunctionError> for PstConstructionError
impl From<UnknownFunctionError> for PstConstructionError
Source§fn from(source: UnknownFunctionError) -> PstConstructionError
fn from(source: UnknownFunctionError) -> PstConstructionError
Source§impl From<UnsupportedErrorNode> for PstConstructionError
impl From<UnsupportedErrorNode> for PstConstructionError
Source§fn from(source: UnsupportedErrorNode) -> PstConstructionError
fn from(source: UnsupportedErrorNode) -> PstConstructionError
Source§impl From<WrongArityError> for PstConstructionError
impl From<WrongArityError> for PstConstructionError
Source§fn from(source: WrongArityError) -> PstConstructionError
fn from(source: WrongArityError) -> PstConstructionError
Source§impl From<WrongSlotPositionError> for PstConstructionError
impl From<WrongSlotPositionError> for PstConstructionError
Source§fn from(source: WrongSlotPositionError) -> PstConstructionError
fn from(source: WrongSlotPositionError) -> PstConstructionError
Source§impl PartialEq for PstConstructionError
impl PartialEq for PstConstructionError
Source§fn eq(&self, other: &PstConstructionError) -> bool
fn eq(&self, other: &PstConstructionError) -> bool
self and other values to be equal, and is used by ==.impl Eq for PstConstructionError
impl StructuralPartialEq for PstConstructionError
Auto Trait Implementations§
impl Freeze for PstConstructionError
impl RefUnwindSafe for PstConstructionError
impl Send for PstConstructionError
impl Sync for PstConstructionError
impl Unpin for PstConstructionError
impl UnsafeUnpin for PstConstructionError
impl UnwindSafe for PstConstructionError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
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>
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>
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