[][src]Module user_stable_vtable::traits

Traits used by this library to provide features

Structs

VTable

A type which is layout compatible with a vtable from rfc 2955, but may not be relied upon to uphold the invariants of such a vtable

Traits

StableMutable

A stable-layout mutable (unique) reference.

StablePointer

Defines a type which is Layout Compatible with a stable-layout-pointer from rfc 2955. All implementations of this trait for a particular Trait shall be valid to transmute between, except that implementations may validly impose a NonNull requirement on both the data and vtable pointers. Additionally, it shall be valid to transmute from any implementation of StableRef, and to an implementation of StableRef or StableMut, provided the reference validity requirements are upheld.

StablePointerCast
StablePointerLifetime
StableReference

Defines a safe-to-use type which is Layout Compatible with a stable-layout-pointer from rfc 2955 It shall not be possible to safely construct a StableRef<'a,Trait> unless Trait: 'a, or any of the following is violated: The VTable shall be valid to read for reading for its size and for 'a, and shall not be modifiable through the reference. The VTable pointer may be assumed to be readonly. data shall be valid for reading for size, and well aligned to align for 'a.

StableVTableTrait

Defines a type which is a trait object for a stable_vtable trait as per rfc 2955

TraitVTable

Defines a type which is a valid vtable for a stable_vtable trait from rfc 2955 Consumers of this trait may assume implementors can be freely transmuted to the VTable trait defined in this module, and that the defined invariants for the fields of the vtable are upheld. Additionally, implementations for the same Trait may be freely transmuted between each other.