#[repr(C)]
pub struct CGlueTraitObj<'a, T, V: 'a, C, R> { /* private fields */ }
Expand description

Simple CGlue trait object.

This is the simplest form of CGlue object, represented by a container and vtable for a single trait.

Container merely is a this pointer with some optional temporary return reference context.

Implementations§

source§

impl<'a, T: Deref<Target = F>, F, V: CGlueVtbl<CGlueObjContainer<T, C, R>, Context = C, RetTmp = R>, C: ContextBounds, R: Default> CGlueTraitObj<'a, T, V, V::Context, V::RetTmp>where &'a V: Default,

source

pub fn from_thingies(d: (T, V::Context)) -> Self

Trait Implementations§

source§

impl<CGlueT, CGlueV, CGlueC, CGlueR, T> AsMut<T> for CGlueTraitObj<'_, CGlueT, CGlueV, CGlueC, CGlueR>where Self: AsMutExt<T>,

source§

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

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<CGlueT, CGlueV, CGlueC, CGlueR, T> AsRef<T> for CGlueTraitObj<'_, CGlueT, CGlueV, CGlueC, CGlueR>where Self: AsRefExt<T>,

source§

fn as_ref(&self) -> &T

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<CGlueT, CGlueV, CGlueC, CGlueR> Binary for CGlueTraitObj<'_, CGlueT, CGlueV, CGlueC, CGlueR>where Self: BinaryExt,

source§

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

Formats the value using the given formatter.
source§

impl<CGlueT, CGlueV, CGlueC, CGlueR> Clone for CGlueTraitObj<'_, CGlueT, CGlueV, CGlueC, CGlueR>where Self: CloneExt,

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<CGlueT, CGlueV, CGlueC, CGlueR> Debug for CGlueTraitObj<'_, CGlueT, CGlueV, CGlueC, CGlueR>where Self: DebugExt,

source§

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

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

impl<CGlueT, CGlueV, CGlueC, CGlueR> Display for CGlueTraitObj<'_, CGlueT, CGlueV, CGlueC, CGlueR>where Self: DisplayExt,

source§

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

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

impl<'a, T, V: CGlueVtbl<CGlueObjContainer<CBox<'a, T>, C, R>, Context = C, RetTmp = R>, C: ContextBounds, R: Default> From<(T, <V as CGlueBaseVtbl>::Context)> for CGlueTraitObj<'a, CBox<'a, T>, V, V::Context, V::RetTmp>where &'a V: Default,

source§

fn from((this, context): (T, V::Context)) -> Self

Converts to this type from the input type.
source§

impl<'a, T: Deref<Target = F>, F, V: CGlueVtbl<CGlueObjContainer<T, C, R>, Context = C, RetTmp = R>, C: ContextBounds, R: Default> From<(T, <V as CGlueBaseVtbl>::Context)> for CGlueTraitObj<'a, T, V, V::Context, V::RetTmp>where &'a V: Default,

source§

fn from((instance, context): (T, V::Context)) -> Self

Converts to this type from the input type.
source§

impl<'a, T: Deref<Target = F>, F, V: CGlueVtbl<CGlueObjContainer<T, C, R>, Context = C, RetTmp = R>, C: ContextBounds, R: Default> From<CGlueObjContainer<T, C, R>> for CGlueTraitObj<'a, T, V, V::Context, V::RetTmp>where &'a V: Default,

source§

fn from(container: CGlueObjContainer<T, C, R>) -> Self

Converts to this type from the input type.
source§

impl<'a, T, V: CGlueVtbl<CGlueObjContainer<CBox<'a, T>, NoContext, R>, Context = NoContext, RetTmp = R>, R: Default> From<T> for CGlueTraitObj<'a, CBox<'a, T>, V, V::Context, V::RetTmp>where &'a V: Default,

source§

fn from(this: T) -> Self

Converts to this type from the input type.
source§

impl<'a, T: Deref<Target = F>, F, V: CGlueVtbl<CGlueObjContainer<T, NoContext, R>, Context = NoContext, RetTmp = R>, R: Default> From<T> for CGlueTraitObj<'a, T, V, V::Context, V::RetTmp>where &'a V: Default,

source§

fn from(this: T) -> Self

Converts to this type from the input type.
source§

impl<T: Deref<Target = F>, F, V, C: ContextBounds, R> GetContainer for CGlueTraitObj<'_, T, V, C, R>

§

type ContType = CGlueObjContainer<T, C, R>

source§

fn ccont_ref(&self) -> &Self::ContType

source§

fn ccont_mut(&mut self) -> &mut Self::ContType

source§

fn into_ccont(self) -> Self::ContType

source§

fn build_with_ccont(&self, container: Self::ContType) -> Self

source§

impl<T, V, C, R> GetVtbl<V> for CGlueTraitObj<'_, T, V, C, R>

source§

fn get_vtbl(&self) -> &V

source§

impl<CGlueT, CGlueV, CGlueC, CGlueR> LowerExp for CGlueTraitObj<'_, CGlueT, CGlueV, CGlueC, CGlueR>where Self: LowerExpExt,

source§

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

Formats the value using the given formatter.
source§

impl<CGlueT, CGlueV, CGlueC, CGlueR> LowerHex for CGlueTraitObj<'_, CGlueT, CGlueV, CGlueC, CGlueR>where Self: LowerHexExt,

source§

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

Formats the value using the given formatter.
source§

impl<CGlueT, CGlueV, CGlueC, CGlueR> Octal for CGlueTraitObj<'_, CGlueT, CGlueV, CGlueC, CGlueR>where Self: OctalExt,

source§

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

Formats the value using the given formatter.
source§

impl<'a, T: Opaquable, F: CGlueBaseVtbl<Context = C, RetTmp = R>, C: ContextBounds, R: Default> Opaquable for CGlueTraitObj<'a, T, F, C, R>

§

type OpaqueTarget = CGlueTraitObj<'a, <T as Opaquable>::OpaqueTarget, <F as CGlueBaseVtbl>::OpaqueVtbl, C, R>

source§

fn into_opaque(self) -> Self::OpaqueTarget

Transform self into an opaque version of the trait object. Read more
source§

impl<CGlueT, CGlueV, CGlueC, CGlueR> Pointer for CGlueTraitObj<'_, CGlueT, CGlueV, CGlueC, CGlueR>where Self: PointerExt,

source§

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

Formats the value using the given formatter.
source§

impl<CGlueT, CGlueV, CGlueC, CGlueR> UpperExp for CGlueTraitObj<'_, CGlueT, CGlueV, CGlueC, CGlueR>where Self: UpperExpExt,

source§

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

Formats the value using the given formatter.
source§

impl<CGlueT, CGlueV, CGlueC, CGlueR> UpperHex for CGlueTraitObj<'_, CGlueT, CGlueV, CGlueC, CGlueR>where Self: UpperHexExt,

source§

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

Formats the value using the given formatter.
source§

impl<CGlueT, CGlueV, CGlueC, CGlueR> Write for CGlueTraitObj<'_, CGlueT, CGlueV, CGlueC, CGlueR>where Self: WriteExt,

source§

fn write_str(&mut self, s: &str) -> Result<(), Error>

Writes a string slice into this writer, returning whether the write succeeded. Read more
1.1.0 · source§

fn write_char(&mut self, c: char) -> Result<(), Error>

Writes a char into this writer, returning whether the write succeeded. Read more
1.0.0 · source§

fn write_fmt(&mut self, args: Arguments<'_>) -> Result<(), Error>

Glue for usage of the write! macro with implementors of this trait. Read more

Auto Trait Implementations§

§

impl<'a, T, V, C, R> RefUnwindSafe for CGlueTraitObj<'a, T, V, C, R>where C: RefUnwindSafe, R: RefUnwindSafe, T: RefUnwindSafe, V: RefUnwindSafe,

§

impl<'a, T, V, C, R> Send for CGlueTraitObj<'a, T, V, C, R>where C: Send, R: Send, T: Send, V: Sync,

§

impl<'a, T, V, C, R> Sync for CGlueTraitObj<'a, T, V, C, R>where C: Sync, R: Sync, T: Sync, V: Sync,

§

impl<'a, T, V, C, R> Unpin for CGlueTraitObj<'a, T, V, C, R>where C: Unpin, R: Unpin, T: Unpin,

§

impl<'a, T, V, C, R> UnwindSafe for CGlueTraitObj<'a, T, V, C, R>where C: UnwindSafe, R: UnwindSafe, T: UnwindSafe, V: 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<!> for T

source§

fn from(t: !) -> T

Converts to this type from the input type.
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> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
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> ContextBounds for Twhere T: 'static + Clone + Send + Sync,

source§

impl<T> GenericTypeBounds for T

source§

impl<T> Opaque for Twhere T: Opaquable<OpaqueTarget = T>,