abi_stable::abi_stability::extra_checks

Type Alias ExtraChecksRef

Source
pub type ExtraChecksRef<'a> = ExtraChecks_TO<RRef<'a, ()>>;
Expand description

An ffi-safe equivalent of &'a dyn ExtraChecks.

Aliased Type§

struct ExtraChecksRef<'a> {
    pub obj: RObject<'static, RRef<'a, ()>, ExtraChecks_Interface, VTable_Prefix<(), RRef<'a, ()>>>,
    /* private fields */
}

Fields§

§obj: RObject<'static, RRef<'a, ()>, ExtraChecks_Interface, VTable_Prefix<(), RRef<'a, ()>>>

Implementations

Source§

impl<'_sub> ExtraChecks_TO<RRef<'_sub, ()>>

Source

pub const fn from_const<_Self, Downcasting>( ptr: &'_sub _Self, can_it_downcast: Downcasting, ) -> Self
where _Self: ExtraChecks + 'static, ExtraChecks_Interface: GetRObjectVTable<Downcasting, _Self, RRef<'_sub, ()>, &'_sub _Self>,

Constructs this trait from a constant of a type that implements ExtraChecks.

This method is automatically generated, for more documentation you can look at abi_stable::docs::sabi_trait_inherent

You can construct the vtable_for parameter with [ExtraChecks_MV::VTABLE].

can_it_downcast describes whether the trait object can be converted back into the original type or not.
Its possible values are TD_CanDowncast and TD_Opaque.

Source§

impl<_ErasedPtr> ExtraChecks_TO<_ErasedPtr>
where _ErasedPtr: AsPtr<PtrTarget = ()>,

Source

pub fn from_ptr<_OrigPtr, Downcasting>( ptr: _OrigPtr, can_it_downcast: Downcasting, ) -> Self
where _OrigPtr: CanTransmuteElement<(), TransmutedPtr = _ErasedPtr>, _OrigPtr::PtrTarget: ExtraChecks + Sized, ExtraChecks_Interface: GetRObjectVTable<Downcasting, _OrigPtr::PtrTarget, _ErasedPtr, _OrigPtr>,

Constructs this trait object from a pointer to a type that implements ExtraChecks.

This method is automatically generated, for more documentation you can look at abi_stable::docs::sabi_trait_inherent

can_it_downcast describes whether the trait object can be converted back into the original type or not.
Its possible values are TD_CanDowncast and TD_Opaque.

Source

pub fn from_sabi(obj: ExtraChecks_Backend<_ErasedPtr>) -> Self

Constructs this trait object from its underlying implementation.

This method is automatically generated, for more documentation you can look at abi_stable::docs::sabi_trait_inherent

Source

pub fn sabi_reborrow<'_sub>(&'_sub self) -> ExtraChecks_TO<RRef<'_sub, ()>>

Reborrows this trait object to a reference-based trait object.

This method is automatically generated, for more documentation you can look at abi_stable::docs::sabi_trait_inherent

Source

pub fn sabi_reborrow_mut<'_sub>( &'_sub mut self, ) -> ExtraChecks_TO<RMut<'_sub, ()>>
where _ErasedPtr: AsMutPtr<PtrTarget = ()>,

Reborrows this trait object to a mutable-reference-based trait object.

This method is automatically generated, for more documentation you can look at abi_stable::docs::sabi_trait_inherent

Source§

impl<_ErasedPtr> ExtraChecks_TO<_ErasedPtr>
where _ErasedPtr: AsPtr<PtrTarget = ()>, Self: Clone + Display + Debug + Send + Sync,

Source

pub fn type_layout(&self) -> &'static TypeLayout
where _ErasedPtr: AsPtr<PtrTarget = ()>,

This is the inherent equivalent of the trait method of the same name

Source

pub fn check_compatibility( &self, param_0: &'static TypeLayout, param_1: &'static TypeLayout, param_2: TypeCheckerMut<'_>, ) -> RResult<(), ExtraChecksError>
where _ErasedPtr: AsPtr<PtrTarget = ()>,

This is the inherent equivalent of the trait method of the same name

Source

pub fn nested_type_layouts<'_self>( &'_self self, ) -> RCowSlice<'_self, &'static TypeLayout>
where _ErasedPtr: AsPtr<PtrTarget = ()>,

This is the inherent equivalent of the trait method of the same name

Source

pub fn combine( &self, param_0: ExtraChecksRef<'_>, param_1: TypeCheckerMut<'_>, ) -> RResult<ROption<ExtraChecksBox>, ExtraChecksError>
where _ErasedPtr: AsPtr<PtrTarget = ()>,

This is the inherent equivalent of the trait method of the same name

Trait Implementations

Source§

impl<_ErasedPtr> Clone for ExtraChecks_TO<_ErasedPtr>
where ExtraChecks_Backend<_ErasedPtr>: Clone, _ErasedPtr: AsPtr<PtrTarget = ()>,

Source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<_ErasedPtr> Debug for ExtraChecks_TO<_ErasedPtr>
where _ErasedPtr: AsPtr<PtrTarget = ()>,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<_ErasedPtr> Display for ExtraChecks_TO<_ErasedPtr>
where _ErasedPtr: AsPtr<PtrTarget = ()>,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<_ErasedPtr> GetStaticEquivalent_ for ExtraChecks_TO<_ErasedPtr>
where _ErasedPtr: __GetPointerKind + __StableAbi, ExtraChecks_Backend<_ErasedPtr>: StableAbi,

Source§

type StaticEquivalent = _static_ExtraChecks_TO<<_ErasedPtr as GetStaticEquivalent_>::StaticEquivalent>

The 'static equivalent of Self
Source§

impl<_ErasedPtr> StableAbi for ExtraChecks_TO<_ErasedPtr>
where _ErasedPtr: __GetPointerKind + __StableAbi, ExtraChecks_Backend<_ErasedPtr>: StableAbi,

Source§

const LAYOUT: &'static TypeLayout = _

The layout of the type provided by implementors.
Source§

type IsNonZeroType = <RObject<'static, _ErasedPtr, ExtraChecks_Interface, VTable_Prefix<(), _ErasedPtr>> as StableAbi>::IsNonZeroType

Whether this type has a single invalid bit-pattern. Read more
Source§

const ABI_CONSTS: AbiConsts = _

const-equivalents of the associated types.
Source§

impl<_ErasedPtr> Send for ExtraChecks_TO<_ErasedPtr>
where _ErasedPtr: __GetPointerKind,

Source§

impl<_ErasedPtr> Sync for ExtraChecks_TO<_ErasedPtr>
where _ErasedPtr: __GetPointerKind,