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>

source

pub fn push(&mut self, kind: ErrorKind<Prim>)

Adds a new error into this the error list.

source

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.

source

pub fn by_ref(&mut self) -> OpErrors<'_, Prim>

Mutably borrows this container allowing to use it multiple times.

source

pub fn join_path( &mut self, path: impl Into<ErrorPathFragment> ) -> OpErrors<'_, Prim>

Narrows down the path to the error.

Trait Implementations§

source§

impl<'a, Prim: Debug + PrimitiveType> Debug for OpErrors<'a, Prim>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

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> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.