Trait abi_stable::abi_stability::get_static_equivalent::GetStaticEquivalent_[][src]

pub unsafe trait GetStaticEquivalent_ {
    type StaticEquivalent: 'static;
}
Expand description

A type that stands in for Self,used to create a UTypeId for doing layout checking.

This may or may not have the same TypeId as Self.

Safety

The StaticEquivalent associated type must be either of:

  • the same type as Self, ignoring lifetime arguments.
  • a type declared specifically to be the StaticEquivalent associated type of Self(and no other type), with the same type and const arguments as Self.

In either case, non-'static type parameters can be replaced with their GetStaticEquivalent_::StaticEquivalent associated type.

Associated Types

Implementations on Foreign Types

When the “const_params” feature is disabled, this trait is implemented for arrays of up to 32 elements.

This is the only function type that implements StableAbi so as to make it more obvious that functions involving lifetimes cannot implement this trait directly (because of higher ranked trait bounds).

This is the only function type that implements StableAbi so as to make it more obvious that functions involving lifetimes cannot implement this trait directly (because of higher ranked trait bounds).

Implementors