pub struct CallbackInterface {
    pub(super) name: String,
    pub(super) module_path: String,
    pub(super) methods: Vec<Method>,
    pub(super) ffi_init_callback: FfiFunction,
    pub(super) docstring: Option<String>,
}

Fields§

§name: String§module_path: String§methods: Vec<Method>§ffi_init_callback: FfiFunction§docstring: Option<String>

Implementations§

source§

impl CallbackInterface

source

pub fn name(&self) -> &str

source

pub fn methods(&self) -> Vec<&Method>

source

pub fn ffi_init_callback(&self) -> &FfiFunction

source

pub(super) fn derive_ffi_funcs(&mut self)

source

pub fn ffi_callbacks(&self) -> Vec<FfiCallbackFunction>

FfiCallbacks to define for our methods.

source

pub fn vtable(&self) -> FfiType

The VTable FFI type

source

pub fn vtable_definition(&self) -> FfiStruct

the VTable struct to define.

source

pub fn vtable_methods(&self) -> Vec<(FfiCallbackFunction, &Method)>

Vec of (ffi_callback, method) pairs

source

pub fn iter_types(&self) -> TypeIterator<'_>

source

pub fn docstring(&self) -> Option<&str>

source

pub fn has_async_method(&self) -> bool

Trait Implementations§

source§

impl AsType for CallbackInterface

source§

fn as_type(&self) -> Type

source§

impl Checksum for CallbackInterface

source§

fn checksum<__H: Hasher>(&self, state: &mut __H)

source§

impl Clone for CallbackInterface

source§

fn clone(&self) -> CallbackInterface

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 Debug for CallbackInterface

source§

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

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

impl TryFrom<CallbackInterfaceMetadata> for CallbackInterface

§

type Error = Error

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

fn try_from(meta: CallbackInterfaceMetadata) -> Result<Self>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where 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, U> Into<U> for T
where 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 T
where 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, U> TryFrom<U> for T
where 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 T
where 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.