TypeMismatch

Struct TypeMismatch 

Source
pub struct TypeMismatch<source, left, right, msg> {
    pub source: source,
    pub left: left,
    pub right: right,
    pub msg: msg,
}
Expand description

Generate an error for incompatible types between a “left” and a “right” values.

Fields§

§source: source

Span of the entire error

§left: left

Left expression

§right: right

Right expression

§msg: msg

Further details on mismatch

Trait Implementations§

Source§

impl<source, left, right, msg> IntoError for TypeMismatch<source, left, right, msg>
where source: TrySpan, left: Display + TrySpan, right: Display + TrySpan, msg: Display,

Source§

fn into_err(self) -> Error

Produce the sequence of spans and help messages.

Auto Trait Implementations§

§

impl<source, left, right, msg> Freeze for TypeMismatch<source, left, right, msg>
where source: Freeze, left: Freeze, right: Freeze, msg: Freeze,

§

impl<source, left, right, msg> RefUnwindSafe for TypeMismatch<source, left, right, msg>
where source: RefUnwindSafe, left: RefUnwindSafe, right: RefUnwindSafe, msg: RefUnwindSafe,

§

impl<source, left, right, msg> Send for TypeMismatch<source, left, right, msg>
where source: Send, left: Send, right: Send, msg: Send,

§

impl<source, left, right, msg> Sync for TypeMismatch<source, left, right, msg>
where source: Sync, left: Sync, right: Sync, msg: Sync,

§

impl<source, left, right, msg> Unpin for TypeMismatch<source, left, right, msg>
where source: Unpin, left: Unpin, right: Unpin, msg: Unpin,

§

impl<source, left, right, msg> UnwindSafe for TypeMismatch<source, left, right, msg>
where source: UnwindSafe, left: UnwindSafe, right: UnwindSafe, msg: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where 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 T
where 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 T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.