pub enum BuiltinImplSource {
Misc,
Object {
vtable_base: usize,
},
TraitUpcasting {
vtable_vptr_slot: Option<usize>,
},
TupleUnsizing,
}
Variants§
Misc
Some builtin impl we don’t need to differentiate. This should be used unless more specific information is necessary.
Object
A builtin impl for trait objects.
The vtable is formed by concatenating together the method lists of
the base object trait and all supertraits, pointers to supertrait vtable will
be provided when necessary; this is the start of upcast_trait_ref
’s methods
in that vtable.
TraitUpcasting
The vtable is formed by concatenating together the method lists of
the base object trait and all supertraits, pointers to supertrait vtable will
be provided when necessary; this is the position of upcast_trait_ref
’s vtable
within that vtable.
TupleUnsizing
Unsizing a tuple like (A, B, ..., X)
to (A, B, ..., Y)
if X
unsizes to Y
.
This needs to be a separate variant as it is still unstable and we need to emit a feature error when using it on stable.
Auto Trait Implementations§
impl RefUnwindSafe for BuiltinImplSource
impl Send for BuiltinImplSource
impl Sync for BuiltinImplSource
impl Unpin for BuiltinImplSource
impl UnwindSafe for BuiltinImplSource
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
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 16 bytes
Size for each variant:
Misc
: 0 bytesObject
: 16 bytesTraitUpcasting
: 16 bytesTupleUnsizing
: 0 bytes