pub enum ImplExprAtom {
Concrete(ItemRef),
LocalBound {
predicate_id: PredicateId,
index: usize,
trait: Binder<TraitRef>,
path: Vec<ImplExprPathChunk>,
},
SelfImpl {
trait: Binder<TraitRef>,
path: Vec<ImplExprPathChunk>,
},
Dyn,
Builtin {
trait_data: BuiltinTraitData,
impl_exprs: Vec<ImplExpr>,
types: Vec<(DefId, Ty, Vec<ImplExpr>)>,
},
Error(String),
}Expand description
The source of a particular trait implementation. Most often this is either Concrete for a
concrete impl Trait for Type {} item, or LocalBound for a context-bound where T: Trait.
Variants§
Concrete(ItemRef)
A concrete impl Trait for Type {} item.
LocalBound
A context-bound clause like where T: Trait.
Fields
predicate_id: PredicateIdindex: usizeThe nth (non-self) predicate found for this item. We use predicates from
required_predicates starting from the parentmost item.
path: Vec<ImplExprPathChunk>SelfImpl
The implicit Self: Trait clause present inside a trait Trait {} item.
Dyn
dyn Trait is a wrapped value with a virtual table for trait
Trait. In other words, a value dyn Trait is a dependent
triple that gathers a type τ, a value of type τ and an
instance of type Trait.
dyn Trait implements Trait using a built-in implementation; this refers to that
built-in implementation.
Builtin
A built-in trait whose implementation is computed by the compiler, such as FnMut. This
morally points to an invisible impl block; as such it contains the information we may
need from one.
Fields
trait_data: BuiltinTraitDataExtra data for the given trait.
Error(String)
An error happened while resolving traits.
Trait Implementations§
Source§impl Clone for ImplExprAtom
impl Clone for ImplExprAtom
Source§fn clone(&self) -> ImplExprAtom
fn clone(&self) -> ImplExprAtom
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ImplExprAtom
impl Debug for ImplExprAtom
Source§impl<'de> Deserialize<'de> for ImplExprAtom
impl<'de> Deserialize<'de> for ImplExprAtom
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Hash for ImplExprAtom
impl Hash for ImplExprAtom
Source§impl JsonSchema for ImplExprAtom
impl JsonSchema for ImplExprAtom
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read moreSource§impl Ord for ImplExprAtom
impl Ord for ImplExprAtom
Source§fn cmp(&self, other: &ImplExprAtom) -> Ordering
fn cmp(&self, other: &ImplExprAtom) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for ImplExprAtom
impl PartialEq for ImplExprAtom
Source§impl PartialOrd for ImplExprAtom
impl PartialOrd for ImplExprAtom
Source§impl<'tcx, S: UnderOwnerState<'tcx>> SInto<S, ImplExprAtom> for ImplExprAtom<'tcx>
impl<'tcx, S: UnderOwnerState<'tcx>> SInto<S, ImplExprAtom> for ImplExprAtom<'tcx>
fn sinto(&self, s: &S) -> ImplExprAtom
Source§impl Serialize for ImplExprAtom
impl Serialize for ImplExprAtom
impl Eq for ImplExprAtom
impl StructuralPartialEq for ImplExprAtom
Auto Trait Implementations§
impl Freeze for ImplExprAtom
impl RefUnwindSafe for ImplExprAtom
impl Send for ImplExprAtom
impl Sync for ImplExprAtom
impl Unpin for ImplExprAtom
impl UnwindSafe for ImplExprAtom
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more