Module abi_stable::erased_types
source · Expand description
Types and traits related to type erasure.
Re-exports
pub use crate::DynTrait;
pub use crate::type_level::downcasting::TD_CanDowncast;
pub use crate::type_level::downcasting::TD_Opaque;
Modules
Types that implement
InterfaceType
, used in examples.Ffi-safe trait objects for individual traits.
Structs
Metadata stored in the vtable of
DynTrait<_>
Error for
DynTrait<_>
being downcasted into the wrong type
with one of the *downcasted*
methods.A helper type for constructing a
DynTrait
at compile-time,
by passing VTableDT::GET
to DynTrait::from_const
.Traits
Describes how
D
is deserialized, using a proxy to do so.For getting the
Interface
type parameter in DynTrait<Pointer<()>, Interface>
.An
implementation type
,
with an associated InterfaceType
which describes the traits that
must be implemented when constructing a DynTrait
from Self
,
using the DynTrait::from_value
and DynTrait::from_ptr
constructors,
so as to pass an opaque type across ffi.Associated constant equivalents of the associated types in
InterfaceType
.Defines the usable/required traits when creating a
DynTrait<Pointer<()>, ThisInterfaceType>
.The way to specify the expected
Iterator::Item
type for an InterfaceType
.Gets the expected
Iterator::Item
type for an InterfaceType
,
defaulting to ()
if it doesn’t require Iterator
to be implemented.Describes how a type is serialized by
DynTrait
.Determines the intermediate type a
SerializeImplType
implementor is converted into,
and is then serialized.Type Definitions
For getting the
Interface
type parameter in DynTrait<Pointer<()>, Interface>
.