[][src]Trait abi_stable::abi_stability::extra_checks::TypeChecker_trait::TypeChecker

pub trait TypeChecker {
    fn check_compatibility(
        &mut self,
        interface: &'static TypeLayout,
        implementation: &'static TypeLayout
    ) -> RResult<(), ExtraChecksError>;
fn local_check_compatibility(
        &mut self,
        interface: &'static TypeLayout,
        implementation: &'static TypeLayout
    ) -> RResult<(), ExtraChecksError>; }

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>

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>

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.

Loading content...

Implementors

impl<_ErasedPtr> TypeChecker for TypeChecker_TO<_ErasedPtr> where
    Self: 'static + Sized,
    _ErasedPtr: __GetPointerKind + __DerefMutTrait<Target = ()>, 
[src]

Loading content...