#[non_exhaustive]pub enum PolicySetError {
Show 13 variants
AlreadyDefined(AlreadyDefined),
Linking(LinkingError),
ExpectedStatic(ExpectedStatic),
ExpectedTemplate(ExpectedTemplate),
PolicyNonexistent(PolicyNonexistentError),
TemplateNonexistent(TemplateNonexistentError),
RemoveTemplateWithActiveLinks(RemoveTemplateWithActiveLinksError),
RemoveTemplateNotTemplate(RemoveTemplateNotTemplateError),
LinkNonexistent(LinkNonexistentError),
UnlinkLinkNotLink(UnlinkLinkNotLinkError),
FromJson(PolicyFromJsonError),
ToJson(PolicyToJsonError),
JsonPolicySet(JsonPolicySetError),
}Expand description
Potential errors when adding to a PolicySet.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
AlreadyDefined(AlreadyDefined)
There was a duplicate PolicyId encountered in either the set of
templates or the set of policies.
Linking(LinkingError)
Error when linking a template
ExpectedStatic(ExpectedStatic)
Expected a static policy, but a template-linked policy was provided
ExpectedTemplate(ExpectedTemplate)
Expected a template, but a static policy was provided.
PolicyNonexistent(PolicyNonexistentError)
Error when removing a static policy that doesn’t exist
TemplateNonexistent(TemplateNonexistentError)
Error when removing a template that doesn’t exist
RemoveTemplateWithActiveLinks(RemoveTemplateWithActiveLinksError)
Error when removing a template with active links
RemoveTemplateNotTemplate(RemoveTemplateNotTemplateError)
Error when removing a template that is not a template
LinkNonexistent(LinkNonexistentError)
Error when unlinking a linked policy
UnlinkLinkNotLink(UnlinkLinkNotLinkError)
Error when removing a link that is not a link
FromJson(PolicyFromJsonError)
Error when converting a policy/template from JSON format
ToJson(PolicyToJsonError)
Error when converting a policy/template to JSON format
JsonPolicySet(JsonPolicySetError)
Error during JSON ser/de of the policy set (as opposed to individual policies)
Trait Implementations§
Source§impl Debug for PolicySetError
impl Debug for PolicySetError
Source§impl Diagnostic for PolicySetError
impl Diagnostic for PolicySetError
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 PolicySetError
impl Display for PolicySetError
Source§impl Error for PolicySetError
impl Error for PolicySetError
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
Source§impl From<AlreadyDefined> for PolicySetError
impl From<AlreadyDefined> for PolicySetError
Source§fn from(source: AlreadyDefined) -> Self
fn from(source: AlreadyDefined) -> Self
Source§impl From<ExpectedStatic> for PolicySetError
impl From<ExpectedStatic> for PolicySetError
Source§fn from(source: ExpectedStatic) -> Self
fn from(source: ExpectedStatic) -> Self
Source§impl From<ExpectedTemplate> for PolicySetError
impl From<ExpectedTemplate> for PolicySetError
Source§fn from(source: ExpectedTemplate) -> Self
fn from(source: ExpectedTemplate) -> Self
Source§impl From<JsonPolicySetError> for PolicySetError
impl From<JsonPolicySetError> for PolicySetError
Source§fn from(source: JsonPolicySetError) -> Self
fn from(source: JsonPolicySetError) -> Self
Source§impl From<LinkNonexistentError> for PolicySetError
impl From<LinkNonexistentError> for PolicySetError
Source§fn from(source: LinkNonexistentError) -> Self
fn from(source: LinkNonexistentError) -> Self
Source§impl From<LinkingError> for PolicySetError
impl From<LinkingError> for PolicySetError
Source§fn from(source: LinkingError) -> Self
fn from(source: LinkingError) -> Self
Source§impl From<PolicyFromJsonError> for PolicySetError
impl From<PolicyFromJsonError> for PolicySetError
Source§fn from(source: PolicyFromJsonError) -> Self
fn from(source: PolicyFromJsonError) -> Self
Source§impl From<PolicyNonexistentError> for PolicySetError
impl From<PolicyNonexistentError> for PolicySetError
Source§fn from(source: PolicyNonexistentError) -> Self
fn from(source: PolicyNonexistentError) -> Self
Source§fn from(source: PolicySetError) -> Self
fn from(source: PolicySetError) -> Self
Source§impl From<PolicyToJsonError> for PolicySetError
impl From<PolicyToJsonError> for PolicySetError
Source§fn from(source: PolicyToJsonError) -> Self
fn from(source: PolicyToJsonError) -> Self
Source§impl From<RemoveTemplateNotTemplateError> for PolicySetError
impl From<RemoveTemplateNotTemplateError> for PolicySetError
Source§fn from(source: RemoveTemplateNotTemplateError) -> Self
fn from(source: RemoveTemplateNotTemplateError) -> Self
Source§impl From<RemoveTemplateWithActiveLinksError> for PolicySetError
impl From<RemoveTemplateWithActiveLinksError> for PolicySetError
Source§fn from(source: RemoveTemplateWithActiveLinksError) -> Self
fn from(source: RemoveTemplateWithActiveLinksError) -> Self
Source§impl From<TemplateNonexistentError> for PolicySetError
impl From<TemplateNonexistentError> for PolicySetError
Source§fn from(source: TemplateNonexistentError) -> Self
fn from(source: TemplateNonexistentError) -> Self
Source§impl From<UnlinkLinkNotLinkError> for PolicySetError
impl From<UnlinkLinkNotLinkError> for PolicySetError
Source§fn from(source: UnlinkLinkNotLinkError) -> Self
fn from(source: UnlinkLinkNotLinkError) -> Self
Auto Trait Implementations§
impl Freeze for PolicySetError
impl !RefUnwindSafe for PolicySetError
impl Send for PolicySetError
impl Sync for PolicySetError
impl Unpin for PolicySetError
impl !UnwindSafe for PolicySetError
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> 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