Enum polar_core::diagnostic::Diagnostic
source · [−]pub enum Diagnostic {
Error(PolarError),
Warning(PolarWarning),
}
Variants
Error(PolarError)
Warning(PolarWarning)
Implementations
sourceimpl Diagnostic
impl Diagnostic
pub fn is_error(&self) -> bool
sourcepub fn is_unrecoverable(&self) -> bool
pub fn is_unrecoverable(&self) -> bool
Unrecoverable diagnostics might lead to additional diagnostics that obscure the root issue.
E.g., a ResourceBlock
error for an invalid relations
declaration that will cause a
second ResourceBlock
error when rewriting a shorthand rule involving the relation.
pub fn kind(&self) -> String
pub fn get_context(&self) -> Option<Context>
Trait Implementations
sourceimpl Debug for Diagnostic
impl Debug for Diagnostic
sourceimpl Display for Diagnostic
impl Display for Diagnostic
sourceimpl From<PolarError> for Diagnostic
impl From<PolarError> for Diagnostic
sourcefn from(err: PolarError) -> Self
fn from(err: PolarError) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl RefUnwindSafe for Diagnostic
impl Send for Diagnostic
impl Sync for Diagnostic
impl Unpin for Diagnostic
impl UnwindSafe for Diagnostic
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more