[][src]Trait abi_stable::ImplType

pub trait ImplType: Sized + 'static + Send + Sync {
type Interface: InterfaceType;

const INFO: &'static TypeInfo;
}

An implementation type, with an associated interface type which describes the traits that must be implemented when constructing a VirtualWrapper from Self, using the from_value and from_ptr constructors, so as to pass an opaque type across ffi.

To initialize INFO you can use the impl_get_type_info macro.

Uniqueness

Users of this trait can't enforce that they are the only ones with the same interface, therefore they should handle the Err(..)s returned from the VirtualWrapper::*_unerased functions whenever the convert back and forth between Self and Self::Interface.

Associated Types

Loading content...

Associated Constants

const INFO: &'static TypeInfo

Loading content...

Implementors

impl<T, Interface> ImplType for InterfaceFor<T, Interface> where
    Interface: InterfaceType,
    T: 'static, 
[src]

type Interface = Interface

Loading content...