pub enum ImplExprAtom {
Concrete {
id: GlobalIdent,
generics: Vec<GenericArg>,
},
LocalBound {
predicate_id: PredicateId,
index: usize,
trait: Binder<TraitRef>,
path: Vec<ImplExprPathChunk>,
},
SelfImpl {
trait: Binder<TraitRef>,
path: Vec<ImplExprPathChunk>,
},
Dyn,
Builtin {
trait: Binder<TraitRef>,
},
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
A concrete impl Trait for Type {}
item.
LocalBound
A context-bound clause like where T: Trait
.
Fields
predicate_id: PredicateId
index: usize
The 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 Sync
.
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(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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