pub enum DerivedItemKind {
Show 13 variants
Initializer,
IntrinsicFallback,
ClosureAsFnCast,
TraitAliasImpl,
MarkerImpl,
DropGlueMethodDef,
BuiltinAssocItemImpl(DefId),
DestructImpl,
FnImpl(ClosureKind),
VTableDef,
VTableImpl,
VTableMethodShim,
VTableDropShim,
}Variants§
Initializer
A function with no arguments and the body of a constant/static, working as its initializer.
The DefId is that of the constant/static.
IntrinsicFallback
A function that holds the fallback body of an intrinsic, for intrinsics that have one. The
DefId is that of the intrinsic.
ClosureAsFnCast
A function that casts a stateless closure to a function pointer. The DefId is that of the
closure.
TraitAliasImpl
The blanket impl we generate for a trait alias. The DefId is that of the trait alias.
MarkerImpl
A fictitious impl<T> Marker for T {} impl for marker traits like Send. This
is used only for vtable generation. The DefId is that of the trait.
DropGlueMethodDef
The ficticions drop_glue method we add to the Destruct trait. The DefId is that of
the trait.
BuiltinAssocItemImpl(DefId)
An associated item of one of our built-in impls. The base DefId is that of the impl, and
the argument DefId is that of the item declaration.
DestructImpl
A fictitious impl Destruct for Type whose drop_glue method contains the drop glue code
for Type: it calls Drop::drop for the type and then drops its fields. The DefId is
that of the ADT or closure.
FnImpl(ClosureKind)
An impl of the appropriate Fn* trait for a closure, function item or function pointer.
The DefId is that of the closure or synthetic FnPtr DefId.
VTableDef
A struct that defines the vtable for a trait. It has fields for the methods and supertraits
of the trait. The DefId is that of the trait.
VTableImpl
A static that contains the vtable value for a specific impl. The DefId is that of the
impl.
VTableMethodShim
A standalone function used to store a method in a vtable; given a method with self: Ptr<Self> argument, this takes a Ptr<dyn Trait> and casts it to Ptr<Self> before
calling the method. The DefId is that of the method implementation.
VTableDropShim
A standalone function that stores the drop glue for a vtable. It’s a function that takes
&mut dyn Trait and casts it to &mut Self before calling the drop glue on it. The
DefId is that of the impl the vtable is for.
Implementations§
Trait Implementations§
Source§impl Clone for DerivedItemKind
impl Clone for DerivedItemKind
Source§impl Debug for DerivedItemKind
impl Debug for DerivedItemKind
impl Eq for DerivedItemKind
Source§impl Hash for DerivedItemKind
impl Hash for DerivedItemKind
Source§impl PartialEq for DerivedItemKind
impl PartialEq for DerivedItemKind
impl StructuralPartialEq for DerivedItemKind
Auto Trait Implementations§
impl DynSend for DerivedItemKind
impl DynSync for DerivedItemKind
impl Forget for DerivedItemKind
impl Freeze for DerivedItemKind
impl Move for DerivedItemKind
impl RefUnwindSafe for DerivedItemKind
impl Send for DerivedItemKind
impl Sync for DerivedItemKind
impl Unpin for DerivedItemKind
impl UnsafeUnpin for DerivedItemKind
impl UnwindSafe for DerivedItemKind
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,
impl<T> Dedup for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.impl<T> HashConsable for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§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