#[repr(C)]
pub struct AsMutVtbl<'cglue_a, CGlueC: 'cglue_a + CGlueObjBase, T> { /* private fields */ }
Expand description

CGlue vtable for trait AsMut.

This virtual function table contains ABI-safe interface for the given trait.

Implementations§

source§

impl<'cglue_a, CGlueC: CGlueObjBase, T> AsMutVtbl<'cglue_a, CGlueC, T>where T: GenericTypeBounds,

source

pub fn as_mut(&self) -> unsafe extern "C" fn(cont: &mut CGlueC) -> &mut T

Getter for as_mut.

Note that this function is wrapped into unsafe, because if already were is an opaque one, it would allow to invoke undefined behaviour.

Trait Implementations§

source§

impl<'cglue_a, CGlueC: Opaquable + CGlueObjBase + 'cglue_a, T> CGlueBaseVtbl for AsMutVtbl<'cglue_a, CGlueC, T>where T: GenericTypeBounds, CGlueC::OpaqueTarget: Opaquable + CGlueObjBase + GenericTypeBounds, CGlueC::ObjType: AsMut<T>,

§

type OpaqueVtbl = AsMutVtbl<'cglue_a, <CGlueC as Opaquable>::OpaqueTarget, T>

§

type Context = <CGlueC as CGlueObjBase>::Context

§

type RetTmp = PhantomData<AsMutRetTmpPhantom<<CGlueC as CGlueObjBase>::Context, T>>

source§

fn as_opaque(&self) -> &Self::OpaqueVtbl

Get the opaque vtable for the type.
source§

impl<'cglue_a, CGlueC: CGlueObjBase, T> CGlueVtblCont for AsMutVtbl<'cglue_a, CGlueC, T>where T: GenericTypeBounds,

§

type ContType = CGlueC

source§

impl<'cglue_a, CGlueC, CGlueCtx: ContextBounds, T> Default for &'cglue_a AsMutVtbl<'cglue_a, CGlueC, T>where T: GenericTypeBounds, CGlueC::ObjType: AsMut<T>, CGlueC: Opaquable + CGlueObjMut<AsMutRetTmp<CGlueCtx, T>, Context = CGlueCtx> + 'cglue_a, CGlueC::OpaqueTarget: GenericTypeBounds, AsMutVtbl<'cglue_a, CGlueC, T>: CGlueBaseVtbl,

Default vtable reference creation.

source§

fn default() -> Self

Create a static vtable for the given type.

source§

impl<'cglue_a, CGlueC, CGlueCtx: ContextBounds, T> CGlueVtbl<CGlueC> for AsMutVtbl<'cglue_a, CGlueC, T>where T: GenericTypeBounds, CGlueC::OpaqueTarget: Opaquable + CGlueObjBase + GenericTypeBounds, CGlueC: Opaquable + CGlueObjMut<AsMutRetTmp<CGlueCtx, T>, Context = CGlueCtx> + 'cglue_a, CGlueC::ObjType: AsMut<T>,

Auto Trait Implementations§

§

impl<'cglue_a, CGlueC, T> RefUnwindSafe for AsMutVtbl<'cglue_a, CGlueC, T>where CGlueC: RefUnwindSafe,

§

impl<'cglue_a, CGlueC, T> Send for AsMutVtbl<'cglue_a, CGlueC, T>where CGlueC: Sync,

§

impl<'cglue_a, CGlueC, T> Sync for AsMutVtbl<'cglue_a, CGlueC, T>where CGlueC: Sync,

§

impl<'cglue_a, CGlueC, T> Unpin for AsMutVtbl<'cglue_a, CGlueC, T>

§

impl<'cglue_a, CGlueC, T> UnwindSafe for AsMutVtbl<'cglue_a, CGlueC, T>where CGlueC: RefUnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, F> From2<T> for Fwhere T: Into<F>,

source§

fn from2(other: T) -> F

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> GenericTypeBounds for T

source§

impl<T> OpaqueVtblBounds for Twhere T: CGlueVtblCont,