Struct panduck_core::NoteError
source · [−]pub struct NoteError {
pub kind: Box<NoteErrorKind, Global>,
pub level: DiagnosticLevel,
pub file: Option<Url>,
pub range: Option<Range<usize>>,
}
Expand description
Error type for all Notedown operators
Fields
kind: Box<NoteErrorKind, Global>
Actual error kind
level: DiagnosticLevel
Error level for report
file: Option<Url>
File name where error occurred
range: Option<Range<usize>>
Range offset where error occurred
Implementations
sourceimpl NoteError
impl NoteError
sourcepub fn unreachable() -> NoteError
pub fn unreachable() -> NoteError
Constructor of NoteErrorKind::Unreachable
sourcepub fn undefined_variable(name: impl Into<String>) -> NoteError
pub fn undefined_variable(name: impl Into<String>) -> NoteError
Constructor of NoteErrorKind::UndefinedVariable
sourceimpl NoteError
impl NoteError
sourcepub fn is_deprecated(&self) -> bool
pub fn is_deprecated(&self) -> bool
Deprecated or obsolete code. Clients are allowed to rendered diagnostics with this tag strike through.
sourcepub fn is_unnecessary(&self) -> bool
pub fn is_unnecessary(&self) -> bool
Unused or unnecessary code. Clients are allowed to render diagnostics with this tag faded out instead of having an error squiggle.
sourceimpl NoteError
impl NoteError
sourcepub fn syntax_error(msg: impl Into<String>) -> NoteError
pub fn syntax_error(msg: impl Into<String>) -> NoteError
Constructor of [NoteErrorKind::$t
]
sourcepub fn type_mismatch(msg: impl Into<String>) -> NoteError
pub fn type_mismatch(msg: impl Into<String>) -> NoteError
Constructor of [NoteErrorKind::$t
]
sourcepub fn runtime_error(msg: impl Into<String>) -> NoteError
pub fn runtime_error(msg: impl Into<String>) -> NoteError
Constructor of [NoteErrorKind::$t
]
Trait Implementations
sourceimpl Error for NoteError
impl Error for NoteError
1.30.0 · sourcefn 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 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
sourceimpl From<Infallible> for NoteError
impl From<Infallible> for NoteError
sourcefn from(Infallible) -> NoteError
fn from(Infallible) -> NoteError
Converts to this type from the input type.
sourceimpl From<ParseError> for NoteError
impl From<ParseError> for NoteError
sourcefn from(e: ParseError) -> NoteError
fn from(e: ParseError) -> NoteError
Converts to this type from the input type.
sourceimpl From<TryFromBigIntError<BigInt>> for NoteError
impl From<TryFromBigIntError<BigInt>> for NoteError
sourcefn from(e: TryFromBigIntError<BigInt>) -> NoteError
fn from(e: TryFromBigIntError<BigInt>) -> NoteError
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for NoteError
impl Send for NoteError
impl Sync for NoteError
impl Unpin for NoteError
impl !UnwindSafe for NoteError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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