pub struct DiagnosticContext { /* private fields */ }Expand description
A type for accumulating multiple errors
Implementations§
Source§impl DiagnosticContext
impl DiagnosticContext
Sourcepub fn early_return_err(&mut self, error: Error) -> VisResult
pub fn early_return_err(&mut self, error: Error) -> VisResult
Accumulates error into the context, and returns Ok(Action::Continue).
This is useful for when we need to raise an Error because we couldn’t
construct some value that we needed to continue the computation.
pub fn warning_iter(&self) -> impl Iterator<Item = &Error>
pub fn errors_iter(&self) -> impl Iterator<Item = &Error>
Trait Implementations§
Source§impl Debug for DiagnosticContext
impl Debug for DiagnosticContext
Source§impl Default for DiagnosticContext
impl Default for DiagnosticContext
Source§fn default() -> DiagnosticContext
fn default() -> DiagnosticContext
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DiagnosticContext
impl RefUnwindSafe for DiagnosticContext
impl Send for DiagnosticContext
impl Sync for DiagnosticContext
impl Unpin for DiagnosticContext
impl UnwindSafe for DiagnosticContext
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
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>
Converts
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>
Converts
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