Struct arithmetic_typing::error::OpErrors
source · pub struct OpErrors<'a, Prim: PrimitiveType> { /* private fields */ }
Expand description
Error container tied to a particular top-level operation that has a certain span and context.
Supplied as an argument to TypeArithmetic
methods and Substitutions::unify()
.
Implementations§
source§impl<Prim: PrimitiveType> OpErrors<'_, Prim>
impl<Prim: PrimitiveType> OpErrors<'_, Prim>
sourcepub fn check(&mut self, check: impl FnOnce(OpErrors<'_, Prim>)) -> bool
pub fn check(&mut self, check: impl FnOnce(OpErrors<'_, Prim>)) -> bool
Invokes the provided closure and returns false
if new errors were
added during the closure execution.
sourcepub fn by_ref(&mut self) -> OpErrors<'_, Prim>
pub fn by_ref(&mut self) -> OpErrors<'_, Prim>
Mutably borrows this container allowing to use it multiple times.
sourcepub fn join_path(
&mut self,
path: impl Into<ErrorPathFragment>,
) -> OpErrors<'_, Prim>
pub fn join_path( &mut self, path: impl Into<ErrorPathFragment>, ) -> OpErrors<'_, Prim>
Narrows down the path to the error.
Trait Implementations§
Auto Trait Implementations§
impl<'a, Prim> Freeze for OpErrors<'a, Prim>
impl<'a, Prim> !RefUnwindSafe for OpErrors<'a, Prim>
impl<'a, Prim> Send for OpErrors<'a, Prim>
impl<'a, Prim> Sync for OpErrors<'a, Prim>
impl<'a, Prim> Unpin for OpErrors<'a, Prim>where
Prim: Unpin,
impl<'a, Prim> !UnwindSafe for OpErrors<'a, Prim>
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