pub struct NonCovariantInterfaceField<S>where
S: Copy,{
pub name: String,
pub interface: String,
pub field: String,
pub expected: String,
pub ty: String,
pub span: S,
}Expand description
(E0116) Implemented type and type from interface must be covariant.
Fields§
§name: StringValue of {name} that is referenced in the message and/or one of the labels.
interface: StringValue of {interface} that is referenced in the message and/or one of the labels.
field: StringValue of {field} that is referenced in the message and/or one of the labels.
expected: StringValue of {expected} that is referenced in the message and/or one of the labels.
ty: StringValue of {ty} that is referenced in the message and/or one of the labels.
span: SType {name} implements interface {interface} that defines a field {field} of type {expected}, but {field} is {ty} here, which is incompatible.
Trait Implementations§
Source§impl<S> Clone for NonCovariantInterfaceField<S>
impl<S> Clone for NonCovariantInterfaceField<S>
Source§fn clone(&self) -> NonCovariantInterfaceField<S>
fn clone(&self) -> NonCovariantInterfaceField<S>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<S> Debug for NonCovariantInterfaceField<S>
impl<S> Debug for NonCovariantInterfaceField<S>
Source§impl<S> DiagnosticInfo<S> for NonCovariantInterfaceField<S>where
S: Copy,
impl<S> DiagnosticInfo<S> for NonCovariantInterfaceField<S>where
S: Copy,
Source§fn code(&self) -> &'static str
fn code(&self) -> &'static str
Returns the code of this diagnostic. This is usually a letter (e.g.
E)
followed by 4 digits that represent the error number.Source§fn labels(&self) -> Vec<(S, String)>
fn labels(&self) -> Vec<(S, String)>
Returns additional labels for this diagnostic: pairs of spans and
explanations.
Source§fn is_deprecated(&self) -> bool
fn is_deprecated(&self) -> bool
Returns a boolean that indicates if this diagnostic is deprecated.
Deprecated diagnostics are no longer returned but still part of the docs
for historic purposes.
Auto Trait Implementations§
impl<S> Freeze for NonCovariantInterfaceField<S>where
S: Freeze,
impl<S> RefUnwindSafe for NonCovariantInterfaceField<S>where
S: RefUnwindSafe,
impl<S> Send for NonCovariantInterfaceField<S>where
S: Send,
impl<S> Sync for NonCovariantInterfaceField<S>where
S: Sync,
impl<S> Unpin for NonCovariantInterfaceField<S>where
S: Unpin,
impl<S> UnwindSafe for NonCovariantInterfaceField<S>where
S: UnwindSafe,
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