Enum rustc_type_ir::sty::DynKind
source · pub enum DynKind {
Dyn,
DynStar,
}
Expand description
Specifies how a trait object is represented.
Variants§
Dyn
An unsized dyn Trait
object
DynStar
A sized dyn* Trait
object
These objects are represented as a (data, vtable)
pair where data
is a value of some
ptr-sized and ptr-aligned dynamically determined type T
and vtable
is a pointer to the
vtable of impl T for Trait
. This allows a dyn*
object to be treated agnostically with
respect to whether it points to a Box<T>
, Rc<T>
, etc.
Trait Implementations§
source§impl<__CTX> HashStable<__CTX> for DynKindwhere
__CTX: HashStableContext,
impl<__CTX> HashStable<__CTX> for DynKindwhere __CTX: HashStableContext,
fn hash_stable(&self, __hcx: &mut __CTX, __hasher: &mut StableHasher)
source§impl Ord for DynKind
impl Ord for DynKind
source§impl PartialEq<DynKind> for DynKind
impl PartialEq<DynKind> for DynKind
source§impl PartialOrd<DynKind> for DynKind
impl PartialOrd<DynKind> for DynKind
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for DynKind
impl Eq for DynKind
impl StructuralEq for DynKind
impl StructuralPartialEq for DynKind
Auto Trait Implementations§
impl RefUnwindSafe for DynKind
impl Send for DynKind
impl Sync for DynKind
impl Unpin for DynKind
impl UnwindSafe for DynKind
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
source§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for 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: 1 byte
Size for each variant:
Dyn
: 0 bytesDynStar
: 0 bytes