ApiRegistryApi

Struct ApiRegistryApi 

Source
#[repr(C)]
pub struct ApiRegistryApi {
Show 18 fields pub api_registry_version: Option<unsafe extern "C" fn() -> VersionT>, pub set: Option<unsafe extern "C" fn(name: *const c_char, version: VersionT, api: *const c_void, bytes: u32)>, pub remove: Option<unsafe extern "C" fn(api: *const c_void)>, pub get: Option<unsafe extern "C" fn(name: *const c_char, version: VersionT) -> *mut c_void>, pub get_optional: Option<unsafe extern "C" fn(api: *mut *mut c_void, name: *const c_char, version: VersionT)>, pub version: Option<unsafe extern "C" fn(api: *mut c_void) -> VersionT>, pub add_implementation: Option<unsafe extern "C" fn(name: *const c_char, version: VersionT, implementation: *const c_void)>, pub remove_implementation: Option<unsafe extern "C" fn(name: *const c_char, version: VersionT, implementation: *const c_void)>, pub implementations: Option<unsafe extern "C" fn(name: *const c_char, version: VersionT) -> *mut *mut c_void>, pub num_implementations: Option<unsafe extern "C" fn(name: *const c_char, version: VersionT) -> u32>, pub first_implementation: Option<unsafe extern "C" fn(name: *const c_char, version: VersionT) -> *mut c_void>, pub single_implementation: Option<unsafe extern "C" fn(name: *const c_char, version: VersionT) -> *mut c_void>, pub add_listener: Option<unsafe extern "C" fn(listener: *const ApiRegistryListenerI)>, pub static_variable: Option<unsafe extern "C" fn(id: StrhashT, size: u32, file: *const c_char, line: u32) -> *mut c_void>, pub begin_context: Option<unsafe extern "C" fn(name: *const c_char)>, pub end_context: Option<unsafe extern "C" fn(name: *const c_char)>, pub disable_apis_missing_dependencies: Option<unsafe extern "C" fn()>, pub available_versions: Option<unsafe extern "C" fn(name: *const c_char, ta: *mut TempAllocatorI) -> *mut VersionT>,
}

Fields§

§api_registry_version: Option<unsafe extern "C" fn() -> VersionT>§set: Option<unsafe extern "C" fn(name: *const c_char, version: VersionT, api: *const c_void, bytes: u32)>§remove: Option<unsafe extern "C" fn(api: *const c_void)>§get: Option<unsafe extern "C" fn(name: *const c_char, version: VersionT) -> *mut c_void>§get_optional: Option<unsafe extern "C" fn(api: *mut *mut c_void, name: *const c_char, version: VersionT)>§version: Option<unsafe extern "C" fn(api: *mut c_void) -> VersionT>§add_implementation: Option<unsafe extern "C" fn(name: *const c_char, version: VersionT, implementation: *const c_void)>§remove_implementation: Option<unsafe extern "C" fn(name: *const c_char, version: VersionT, implementation: *const c_void)>§implementations: Option<unsafe extern "C" fn(name: *const c_char, version: VersionT) -> *mut *mut c_void>§num_implementations: Option<unsafe extern "C" fn(name: *const c_char, version: VersionT) -> u32>§first_implementation: Option<unsafe extern "C" fn(name: *const c_char, version: VersionT) -> *mut c_void>§single_implementation: Option<unsafe extern "C" fn(name: *const c_char, version: VersionT) -> *mut c_void>§add_listener: Option<unsafe extern "C" fn(listener: *const ApiRegistryListenerI)>§static_variable: Option<unsafe extern "C" fn(id: StrhashT, size: u32, file: *const c_char, line: u32) -> *mut c_void>§begin_context: Option<unsafe extern "C" fn(name: *const c_char)>§end_context: Option<unsafe extern "C" fn(name: *const c_char)>§disable_apis_missing_dependencies: Option<unsafe extern "C" fn()>§available_versions: Option<unsafe extern "C" fn(name: *const c_char, ta: *mut TempAllocatorI) -> *mut VersionT>

Implementations§

Source§

impl ApiRegistryApi

Source

pub unsafe fn api_registry_version(&self) -> VersionT

Source

pub unsafe fn set( &self, name: *const c_char, version: VersionT, api: *const c_void, bytes: u32, )

Source

pub unsafe fn remove(&self, api: *const c_void)

Source

pub unsafe fn get(&self, name: *const c_char, version: VersionT) -> *mut c_void

Source

pub unsafe fn get_optional( &self, api: *mut *mut c_void, name: *const c_char, version: VersionT, )

Source

pub unsafe fn version(&self, api: *mut c_void) -> VersionT

Source

pub unsafe fn add_implementation( &self, name: *const c_char, version: VersionT, implementation: *const c_void, )

Source

pub unsafe fn remove_implementation( &self, name: *const c_char, version: VersionT, implementation: *const c_void, )

Source

pub unsafe fn implementations( &self, name: *const c_char, version: VersionT, ) -> *mut *mut c_void

Source

pub unsafe fn num_implementations( &self, name: *const c_char, version: VersionT, ) -> u32

Source

pub unsafe fn first_implementation( &self, name: *const c_char, version: VersionT, ) -> *mut c_void

Source

pub unsafe fn single_implementation( &self, name: *const c_char, version: VersionT, ) -> *mut c_void

Source

pub unsafe fn add_listener(&self, listener: *const ApiRegistryListenerI)

Source

pub unsafe fn static_variable( &self, id: StrhashT, size: u32, file: *const c_char, line: u32, ) -> *mut c_void

Source

pub unsafe fn begin_context(&self, name: *const c_char)

Source

pub unsafe fn end_context(&self, name: *const c_char)

Source

pub unsafe fn disable_apis_missing_dependencies(&self)

Source

pub unsafe fn available_versions( &self, name: *const c_char, ta: *mut TempAllocatorI, ) -> *mut VersionT

Trait Implementations§

Source§

impl Api for ApiRegistryApi

Source§

impl Clone for ApiRegistryApi

Source§

fn clone(&self) -> ApiRegistryApi

Returns a duplicate 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 Default for ApiRegistryApi

Source§

fn default() -> ApiRegistryApi

Returns the “default value” for a type. Read more
Source§

impl Copy for ApiRegistryApi

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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,

Source§

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>,

Source§

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>,

Source§

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.