[−][src]Trait abi_stable::abi_stability::extra_checks::TypeChecker
This checks that the layout of types coming from dynamic libraries are compatible with those of the binary/dynlib that loads them.
Required methods
fn check_compatibility(
&mut self,
interface: &'static TypeLayout,
implementation: &'static TypeLayout
) -> RResult<(), ExtraChecksError>
&mut self,
interface: &'static TypeLayout,
implementation: &'static TypeLayout
) -> RResult<(), ExtraChecksError>
Checks that ìnterface
is compatible with implementation.
This is equivalent to check_layout_compatibility
,
except that it can also be called re-entrantly
(while check_layout_compatibility
cannot be called re-entrantly)
Errors
The errors detected in this method are always propagated,
to prevent the propagation of errors call the local_check_compatibility
method.
fn local_check_compatibility(
&mut self,
interface: &'static TypeLayout,
implementation: &'static TypeLayout
) -> RResult<(), ExtraChecksError>
&mut self,
interface: &'static TypeLayout,
implementation: &'static TypeLayout
) -> RResult<(), ExtraChecksError>
Checks that ìnterface
is compatible with implementation.
This is equivalent to the check_compatibility
method,
except that it does not propagate errors automatically,
they must be returned as part of the error of the ExtraChecks
that calls this.
Implementors
impl<_ErasedPtr> TypeChecker for TypeChecker_TO<_ErasedPtr> where
Self: 'static + Sized,
_ErasedPtr: __GetPointerKind + __DerefMutTrait<Target = ()>,
[src]
Self: 'static + Sized,
_ErasedPtr: __GetPointerKind + __DerefMutTrait<Target = ()>,
fn check_compatibility(
&mut self,
param_0: &'static TypeLayout,
param_1: &'static TypeLayout
) -> RResult<(), ExtraChecksError>
[src]
&mut self,
param_0: &'static TypeLayout,
param_1: &'static TypeLayout
) -> RResult<(), ExtraChecksError>
fn local_check_compatibility(
&mut self,
param_0: &'static TypeLayout,
param_1: &'static TypeLayout
) -> RResult<(), ExtraChecksError>
[src]
&mut self,
param_0: &'static TypeLayout,
param_1: &'static TypeLayout
) -> RResult<(), ExtraChecksError>