pub struct Cause {
pub reason: Reason,
pub span: NodeSpan,
}Expand description
One piece of source text, and why it required a type: the answer to “where did this type come from”.
Deliberately flat — no chain. A cause names the constraint that introduced a
type, never one that relayed it, and that is arranged when the cause is built
rather than by walking a chain afterwards. See Origin::cause_of.
Fields§
§reason: ReasonWhy that constraint required the two types to match.
span: NodeSpanThe source text it is about.
Trait Implementations§
impl Copy for Cause
impl StructuralPartialEq for Cause
Auto Trait Implementations§
impl Freeze for Cause
impl RefUnwindSafe for Cause
impl Send for Cause
impl Sync for Cause
impl Unpin for Cause
impl UnsafeUnpin for Cause
impl UnwindSafe for Cause
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