Enum cedar_policy_core::parser::err::ParseError
source · pub enum ParseError {
ToCST(ToCSTError),
ToAST(String),
RestrictedExpressionError(RestrictedExpressionError),
}
Expand description
For errors during parsing
Variants§
ToCST(ToCSTError)
Error from the CST parser.
ToAST(String)
Error in the CST -> AST transform, mostly well-formedness issues.
RestrictedExpressionError(RestrictedExpressionError)
Error concerning restricted expressions.
Trait Implementations§
source§impl Clone for ParseError
impl Clone for ParseError
source§fn clone(&self) -> ParseError
fn clone(&self) -> ParseError
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 ParseError
impl Debug for ParseError
source§impl Diagnostic for ParseError
impl Diagnostic for ParseError
source§fn code(&self) -> Option<Box<dyn Display + '_>>
fn code(&self) -> Option<Box<dyn Display + '_>>
Unique diagnostic code that can be used to look up more information
about this
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 + '_>>
Additional help text related to this
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>
Diagnostic severity. This may be used by
ReportHandler
s 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> + '_>>
Labels to apply to this
Diagnostic
’s Diagnostic::source_code
source§fn source_code(&self) -> Option<&dyn SourceCode>
fn source_code(&self) -> Option<&dyn SourceCode>
Source code to apply this
Diagnostic
’s Diagnostic::labels
to.Additional related
Diagnostic
s.source§fn url(&self) -> Option<Box<dyn Display + '_>>
fn url(&self) -> Option<Box<dyn Display + '_>>
URL to visit for a more detailed explanation/help about this
Diagnostic
.source§fn diagnostic_source(&self) -> Option<&dyn Diagnostic>
fn diagnostic_source(&self) -> Option<&dyn Diagnostic>
The cause of the error.
source§impl Display for ParseError
impl Display for ParseError
source§impl Error for ParseError
impl Error for ParseError
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 From<ParseError> for ParseErrors
impl From<ParseError> for ParseErrors
source§fn from(err: ParseError) -> Self
fn from(err: ParseError) -> Self
Converts to this type from the input type.
source§impl From<RestrictedExpressionError> for ParseError
impl From<RestrictedExpressionError> for ParseError
source§fn from(source: RestrictedExpressionError) -> Self
fn from(source: RestrictedExpressionError) -> Self
Converts to this type from the input type.
source§impl From<ToCSTError> for ParseError
impl From<ToCSTError> for ParseError
source§fn from(source: ToCSTError) -> Self
fn from(source: ToCSTError) -> Self
Converts to this type from the input type.
source§impl FromIterator<ParseError> for ParseErrors
impl FromIterator<ParseError> for ParseErrors
source§fn from_iter<T: IntoIterator<Item = ParseError>>(errs: T) -> Self
fn from_iter<T: IntoIterator<Item = ParseError>>(errs: T) -> Self
Creates a value from an iterator. Read more
source§impl PartialEq for ParseError
impl PartialEq for ParseError
source§fn eq(&self, other: &ParseError) -> bool
fn eq(&self, other: &ParseError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for ParseError
Auto Trait Implementations§
impl RefUnwindSafe for ParseError
impl Send for ParseError
impl Sync for ParseError
impl Unpin for ParseError
impl UnwindSafe for ParseError
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