Module abi_stable::sabi_trait
source · Expand description
Contains items related to the #[sabi_trait]
attribute.
Re-exports
pub use crate::type_level::downcasting::TD_CanDowncast;
pub use crate::type_level::downcasting::TD_Opaque;
Modules
Examples of
#[sabi_trait]
generated trait objects,for the documentation.A prelude for modules using
#[sabi_trait]
generated traits/trait objects.Structs
RObject
implements ffi-safe trait objects, for a minimal selection of traits.Error for
RObject<_>
being downcasted into the wrong type
with one of the *downcast*
methods.This is used to safely pass the vtable to
#[sabi_trait]
generated trait objects,
using <Trait>_CTO::from_const( &value, <Trait>_MV::VTABLE )
.Traits
This is used to make sure that reborrowing does not change
the Send-ness or Sync-ness of the pointer.
Type Definitions
The
VTableTO
passed to #[sabi_trait]
generated trait objects that have DynTrait
as their backend.The
VTableTO
passed to #[sabi_trait]
generated trait objects that have RObject
as their backend.