pub struct CBaseRef<'interface> { /* private fields */ }
Expand description
Borrowed emf-core-base
interface.
Implementations§
Source§impl CBaseRef<'_>
impl CBaseRef<'_>
Sourcepub unsafe fn new(interface: NonNullConst<CBaseInterface>) -> Self
pub unsafe fn new(interface: NonNullConst<CBaseInterface>) -> Self
Constructs itself using the native interface.
§Safety
This function is unsafe, as it enables bypassing the locking mechanism.
Trait Implementations§
Source§impl<'interface> CBaseInterfaceInfo for CBaseRef<'interface>
impl<'interface> CBaseInterfaceInfo for CBaseRef<'interface>
Source§type Interface = CBaseInterface
type Interface = CBaseInterface
Type of the interface.
Source§fn interface_version(&self) -> Version
fn interface_version(&self) -> Version
Returns the version of the interface.
Source§fn internal_interface(&self) -> &Self::Interface
fn internal_interface(&self) -> &Self::Interface
Fetches the internal low-level interface.
Source§impl LibraryBinding for CBaseRef<'_>
impl LibraryBinding for CBaseRef<'_>
Source§unsafe fn register_loader(
&mut self,
loader: NonNullConst<LibraryLoaderInterface>,
lib_type: NonNullConst<LibraryType>,
) -> Result<LoaderHandle, Error>
unsafe fn register_loader( &mut self, loader: NonNullConst<LibraryLoaderInterface>, lib_type: NonNullConst<LibraryType>, ) -> Result<LoaderHandle, Error>
Registers a new loader. Read more
Source§unsafe fn unregister_loader(
&mut self,
handle: LoaderHandle,
) -> Result<i8, Error>
unsafe fn unregister_loader( &mut self, handle: LoaderHandle, ) -> Result<i8, Error>
Unregisters an existing loader. Read more
Source§unsafe fn get_loader_interface(
&mut self,
handle: LoaderHandle,
) -> Result<NonNullConst<LibraryLoaderInterface>, Error>
unsafe fn get_loader_interface( &mut self, handle: LoaderHandle, ) -> Result<NonNullConst<LibraryLoaderInterface>, Error>
Fetches the interface of a library loader. Read more
Source§unsafe fn get_loader_handle_from_type(
&self,
lib_type: NonNullConst<LibraryType>,
) -> Result<LoaderHandle, Error>
unsafe fn get_loader_handle_from_type( &self, lib_type: NonNullConst<LibraryType>, ) -> Result<LoaderHandle, Error>
Fetches the loader handle associated with the library type. Read more
Source§unsafe fn get_loader_handle_from_library(
&self,
handle: LibraryHandle,
) -> Result<LoaderHandle, Error>
unsafe fn get_loader_handle_from_library( &self, handle: LibraryHandle, ) -> Result<LoaderHandle, Error>
Fetches the loader handle linked with the library handle. Read more
Source§unsafe fn get_num_loaders(&self) -> usize
unsafe fn get_num_loaders(&self) -> usize
Fetches the number of registered loaders. Read more
Source§unsafe fn library_exists(&self, handle: LibraryHandle) -> Bool
unsafe fn library_exists(&self, handle: LibraryHandle) -> Bool
Checks if a the library handle is valid. Read more
Source§unsafe fn type_exists(&self, lib_type: NonNullConst<LibraryType>) -> Bool
unsafe fn type_exists(&self, lib_type: NonNullConst<LibraryType>) -> Bool
Checks if a library type exists. Read more
Source§unsafe fn get_library_types(
&self,
buffer: NonNull<MutSpan<LibraryType>>,
) -> Result<usize, Error>
unsafe fn get_library_types( &self, buffer: NonNull<MutSpan<LibraryType>>, ) -> Result<usize, Error>
Copies the strings of the registered library types into a buffer. Read more
Source§unsafe fn create_library_handle(&mut self) -> LibraryHandle
unsafe fn create_library_handle(&mut self) -> LibraryHandle
Creates a new unlinked library handle. Read more
Source§unsafe fn remove_library_handle(
&mut self,
handle: LibraryHandle,
) -> Result<i8, Error>
unsafe fn remove_library_handle( &mut self, handle: LibraryHandle, ) -> Result<i8, Error>
Removes an existing library handle. Read more
Source§unsafe fn link_library(
&mut self,
handle: LibraryHandle,
loader: LoaderHandle,
internal: InternalHandle,
) -> Result<i8, Error>
unsafe fn link_library( &mut self, handle: LibraryHandle, loader: LoaderHandle, internal: InternalHandle, ) -> Result<i8, Error>
Links a library handle to an internal library handle. Read more
Source§unsafe fn get_internal_library_handle(
&self,
handle: LibraryHandle,
) -> Result<InternalHandle, Error>
unsafe fn get_internal_library_handle( &self, handle: LibraryHandle, ) -> Result<InternalHandle, Error>
Fetches the internal handle linked with the library handle. Read more
Source§unsafe fn load(
&mut self,
loader: LoaderHandle,
path: NonNullConst<OSPathChar>,
) -> Result<LibraryHandle, Error>
unsafe fn load( &mut self, loader: LoaderHandle, path: NonNullConst<OSPathChar>, ) -> Result<LibraryHandle, Error>
Loads a library. The resulting handle is unique. Read more
Source§unsafe fn unload(&mut self, handle: LibraryHandle) -> Result<i8, Error>
unsafe fn unload(&mut self, handle: LibraryHandle) -> Result<i8, Error>
Unloads a library. Read more
Source§unsafe fn get_data_symbol(
&self,
handle: LibraryHandle,
symbol: NonNullConst<u8>,
) -> Result<Symbol<NonNullConst<c_void>>, Error>
unsafe fn get_data_symbol( &self, handle: LibraryHandle, symbol: NonNullConst<u8>, ) -> Result<Symbol<NonNullConst<c_void>>, Error>
Fetches a data symbol from a library. Read more
Source§unsafe fn get_function_symbol(
&self,
handle: LibraryHandle,
symbol: NonNullConst<u8>,
) -> Result<Symbol<fn()>, Error>
unsafe fn get_function_symbol( &self, handle: LibraryHandle, symbol: NonNullConst<u8>, ) -> Result<Symbol<fn()>, Error>
Fetches a function symbol from a library. Read more
Source§impl ModuleBinding for CBaseRef<'_>
impl ModuleBinding for CBaseRef<'_>
Source§unsafe fn register_loader(
&mut self,
loader: NonNullConst<ModuleLoaderInterface>,
mod_type: NonNullConst<ModuleType>,
) -> Result<LoaderHandle, Error>
unsafe fn register_loader( &mut self, loader: NonNullConst<ModuleLoaderInterface>, mod_type: NonNullConst<ModuleType>, ) -> Result<LoaderHandle, Error>
Registers a new module loader. Read more
Source§unsafe fn unregister_loader(
&mut self,
loader: LoaderHandle,
) -> Result<i8, Error>
unsafe fn unregister_loader( &mut self, loader: LoaderHandle, ) -> Result<i8, Error>
Unregisters an existing module loader. Read more
Source§unsafe fn get_loader_interface(
&mut self,
loader: LoaderHandle,
) -> Result<NonNullConst<ModuleLoaderInterface>, Error>
unsafe fn get_loader_interface( &mut self, loader: LoaderHandle, ) -> Result<NonNullConst<ModuleLoaderInterface>, Error>
Fetches the interface of a module loader. Read more
Source§unsafe fn get_loader_handle_from_type(
&self,
mod_type: NonNullConst<ModuleType>,
) -> Result<LoaderHandle, Error>
unsafe fn get_loader_handle_from_type( &self, mod_type: NonNullConst<ModuleType>, ) -> Result<LoaderHandle, Error>
Fetches the handle of the loader associated with a module type. Read more
Source§unsafe fn get_loader_handle_from_module(
&self,
handle: ModuleHandle,
) -> Result<LoaderHandle, Error>
unsafe fn get_loader_handle_from_module( &self, handle: ModuleHandle, ) -> Result<LoaderHandle, Error>
Fetches the handle of the loader linked with the module handle. Read more
Source§unsafe fn get_num_modules(&self) -> usize
unsafe fn get_num_modules(&self) -> usize
Fetches the number of loaded modules. Read more
Source§unsafe fn get_num_loaders(&self) -> usize
unsafe fn get_num_loaders(&self) -> usize
Fetches the number of loaders. Read more
Source§unsafe fn get_num_exported_interfaces(&self) -> usize
unsafe fn get_num_exported_interfaces(&self) -> usize
Fetches the number of exported interfaces. Read more
Source§unsafe fn module_exists(&self, handle: ModuleHandle) -> Bool
unsafe fn module_exists(&self, handle: ModuleHandle) -> Bool
Checks if a module exists. Read more
Source§unsafe fn type_exists(&self, mod_type: NonNullConst<ModuleType>) -> Bool
unsafe fn type_exists(&self, mod_type: NonNullConst<ModuleType>) -> Bool
Checks if a module type exists. Read more
Source§unsafe fn exported_interface_exists(
&self,
interface: NonNullConst<InterfaceDescriptor>,
) -> Bool
unsafe fn exported_interface_exists( &self, interface: NonNullConst<InterfaceDescriptor>, ) -> Bool
Checks whether an exported interface exists. Read more
Source§unsafe fn get_modules(
&self,
buffer: NonNull<MutSpan<ModuleInfo>>,
) -> Result<usize, Error>
unsafe fn get_modules( &self, buffer: NonNull<MutSpan<ModuleInfo>>, ) -> Result<usize, Error>
Copies the available module info into a buffer. Read more
Source§unsafe fn get_module_types(
&self,
buffer: NonNull<MutSpan<ModuleType>>,
) -> Result<usize, Error>
unsafe fn get_module_types( &self, buffer: NonNull<MutSpan<ModuleType>>, ) -> Result<usize, Error>
Copies the available module types into a buffer. Read more
Source§unsafe fn get_exported_interfaces(
&self,
buffer: NonNull<MutSpan<InterfaceDescriptor>>,
) -> Result<usize, Error>
unsafe fn get_exported_interfaces( &self, buffer: NonNull<MutSpan<InterfaceDescriptor>>, ) -> Result<usize, Error>
Copies the descriptors of the exported interfaces into a buffer. Read more
Source§unsafe fn get_exported_interface_handle(
&self,
interface: NonNullConst<InterfaceDescriptor>,
) -> Result<ModuleHandle, Error>
unsafe fn get_exported_interface_handle( &self, interface: NonNullConst<InterfaceDescriptor>, ) -> Result<ModuleHandle, Error>
Fetches the module handle of the exported interface. Read more
Source§unsafe fn create_module_handle(&mut self) -> ModuleHandle
unsafe fn create_module_handle(&mut self) -> ModuleHandle
Creates a new unlinked module handle. Read more
Source§unsafe fn remove_module_handle(
&mut self,
handle: ModuleHandle,
) -> Result<i8, Error>
unsafe fn remove_module_handle( &mut self, handle: ModuleHandle, ) -> Result<i8, Error>
Removes an existing module handle. Read more
Source§unsafe fn link_module(
&mut self,
handle: ModuleHandle,
loader: LoaderHandle,
internal: InternalHandle,
) -> Result<i8, Error>
unsafe fn link_module( &mut self, handle: ModuleHandle, loader: LoaderHandle, internal: InternalHandle, ) -> Result<i8, Error>
Links a module handle to an internal module handle. Read more
Source§unsafe fn get_internal_module_handle(
&self,
handle: ModuleHandle,
) -> Result<InternalHandle, Error>
unsafe fn get_internal_module_handle( &self, handle: ModuleHandle, ) -> Result<InternalHandle, Error>
Fetches the internal handle linked with the module handle. Read more
Source§unsafe fn add_module(
&mut self,
loader: LoaderHandle,
path: NonNullConst<OSPathChar>,
) -> Result<ModuleHandle, Error>
unsafe fn add_module( &mut self, loader: LoaderHandle, path: NonNullConst<OSPathChar>, ) -> Result<ModuleHandle, Error>
Adds a new module. Read more
Source§unsafe fn remove_module(&mut self, handle: ModuleHandle) -> Result<i8, Error>
unsafe fn remove_module(&mut self, handle: ModuleHandle) -> Result<i8, Error>
Removes a module. Read more
Source§unsafe fn load(&mut self, handle: ModuleHandle) -> Result<i8, Error>
unsafe fn load(&mut self, handle: ModuleHandle) -> Result<i8, Error>
Loads a module. Read more
Source§unsafe fn unload(&mut self, handle: ModuleHandle) -> Result<i8, Error>
unsafe fn unload(&mut self, handle: ModuleHandle) -> Result<i8, Error>
Unloads a module. Read more
Source§unsafe fn initialize(&mut self, handle: ModuleHandle) -> Result<i8, Error>
unsafe fn initialize(&mut self, handle: ModuleHandle) -> Result<i8, Error>
Initializes a module. Read more
Source§unsafe fn terminate(&mut self, handle: ModuleHandle) -> Result<i8, Error>
unsafe fn terminate(&mut self, handle: ModuleHandle) -> Result<i8, Error>
Terminates a module. Read more
Source§unsafe fn add_dependency(
&mut self,
handle: ModuleHandle,
interface: NonNullConst<InterfaceDescriptor>,
) -> Result<i8, Error>
unsafe fn add_dependency( &mut self, handle: ModuleHandle, interface: NonNullConst<InterfaceDescriptor>, ) -> Result<i8, Error>
Registers a new runtime dependency of the module. Read more
Source§unsafe fn remove_dependency(
&mut self,
handle: ModuleHandle,
interface: NonNullConst<InterfaceDescriptor>,
) -> Result<i8, Error>
unsafe fn remove_dependency( &mut self, handle: ModuleHandle, interface: NonNullConst<InterfaceDescriptor>, ) -> Result<i8, Error>
Removes an existing runtime dependency from the module. Read more
Source§unsafe fn export_interface(
&mut self,
handle: ModuleHandle,
interface: NonNullConst<InterfaceDescriptor>,
) -> Result<i8, Error>
unsafe fn export_interface( &mut self, handle: ModuleHandle, interface: NonNullConst<InterfaceDescriptor>, ) -> Result<i8, Error>
Exports an interface of a module. Read more
Source§unsafe fn get_load_dependencies(
&self,
handle: ModuleHandle,
) -> Result<ConstSpan<InterfaceDescriptor>, Error>
unsafe fn get_load_dependencies( &self, handle: ModuleHandle, ) -> Result<ConstSpan<InterfaceDescriptor>, Error>
Fetches the load dependencies of a module. Read more
Source§unsafe fn get_runtime_dependencies(
&self,
handle: ModuleHandle,
) -> Result<ConstSpan<InterfaceDescriptor>, Error>
unsafe fn get_runtime_dependencies( &self, handle: ModuleHandle, ) -> Result<ConstSpan<InterfaceDescriptor>, Error>
Fetches the runtime dependencies of a module. Read more
Source§unsafe fn get_exportable_interfaces(
&self,
handle: ModuleHandle,
) -> Result<ConstSpan<InterfaceDescriptor>, Error>
unsafe fn get_exportable_interfaces( &self, handle: ModuleHandle, ) -> Result<ConstSpan<InterfaceDescriptor>, Error>
Fetches the exportable interfaces of a module. Read more
Source§unsafe fn fetch_status(
&self,
handle: ModuleHandle,
) -> Result<ModuleStatus, Error>
unsafe fn fetch_status( &self, handle: ModuleHandle, ) -> Result<ModuleStatus, Error>
Fetches the load status of a module. Read more
Source§unsafe fn get_module_path(
&self,
handle: ModuleHandle,
) -> Result<NonNullConst<OSPathChar>, Error>
unsafe fn get_module_path( &self, handle: ModuleHandle, ) -> Result<NonNullConst<OSPathChar>, Error>
Fetches the path a module was loaded from. Read more
Source§unsafe fn get_module_info(
&self,
handle: ModuleHandle,
) -> Result<NonNullConst<ModuleInfo>, Error>
unsafe fn get_module_info( &self, handle: ModuleHandle, ) -> Result<NonNullConst<ModuleInfo>, Error>
Fetches the module info from a module. Read more
Source§unsafe fn get_interface(
&self,
handle: ModuleHandle,
interface: NonNullConst<InterfaceDescriptor>,
) -> Result<Interface, Error>
unsafe fn get_interface( &self, handle: ModuleHandle, interface: NonNullConst<InterfaceDescriptor>, ) -> Result<Interface, Error>
Fetches an interface from a module. Read more
Source§impl SysBinding for CBaseRef<'_>
impl SysBinding for CBaseRef<'_>
Source§unsafe fn panic(&self, error: Option<NonNullConst<u8>>) -> !
unsafe fn panic(&self, error: Option<NonNullConst<u8>>) -> !
Execution of the program is stopped abruptly. The error may be logged. Read more
Source§unsafe fn has_function(&self, id: FnId) -> Bool
unsafe fn has_function(&self, id: FnId) -> Bool
Checks if a function is implemented. Read more
Source§unsafe fn get_function(&self, id: FnId) -> Optional<fn()>
unsafe fn get_function(&self, id: FnId) -> Optional<fn()>
Fetches a function from the interface. Read more
Source§unsafe fn get_sync_handler(&self) -> NonNullConst<SyncHandlerInterface>
unsafe fn get_sync_handler(&self) -> NonNullConst<SyncHandlerInterface>
Fetches the active synchronization handler. Read more
Source§unsafe fn set_sync_handler(
&mut self,
handler: Option<NonNullConst<SyncHandlerInterface>>,
)
unsafe fn set_sync_handler( &mut self, handler: Option<NonNullConst<SyncHandlerInterface>>, )
Sets a new synchronization handler. Read more
Source§impl VersionBinding for CBaseRef<'_>
impl VersionBinding for CBaseRef<'_>
Source§unsafe fn new_short(&self, major: i32, minor: i32, patch: i32) -> Version
unsafe fn new_short(&self, major: i32, minor: i32, patch: i32) -> Version
Constructs a new version. Read more
Source§unsafe fn new_long(
&self,
major: i32,
minor: i32,
patch: i32,
release_type: ReleaseType,
release_number: i8,
) -> Version
unsafe fn new_long( &self, major: i32, minor: i32, patch: i32, release_type: ReleaseType, release_number: i8, ) -> Version
Constructs a new version. Read more
Source§unsafe fn new_full(
&self,
major: i32,
minor: i32,
patch: i32,
release_type: ReleaseType,
release_number: i8,
build: i64,
) -> Version
unsafe fn new_full( &self, major: i32, minor: i32, patch: i32, release_type: ReleaseType, release_number: i8, build: i64, ) -> Version
Constructs a new version. Read more
Source§unsafe fn from_string(
&self,
buffer: NonNullConst<ConstSpan<u8>>,
) -> Result<Version, Error>
unsafe fn from_string( &self, buffer: NonNullConst<ConstSpan<u8>>, ) -> Result<Version, Error>
Constructs a version from a string. Read more
Source§unsafe fn string_length_short(&self, version: NonNullConst<Version>) -> usize
unsafe fn string_length_short(&self, version: NonNullConst<Version>) -> usize
Computes the length of the short version string. Read more
Source§unsafe fn string_length_long(&self, version: NonNullConst<Version>) -> usize
unsafe fn string_length_long(&self, version: NonNullConst<Version>) -> usize
Computes the length of the long version string. Read more
Source§unsafe fn string_length_full(&self, version: NonNullConst<Version>) -> usize
unsafe fn string_length_full(&self, version: NonNullConst<Version>) -> usize
Computes the length of the full version string. Read more
Source§unsafe fn as_string_short(
&self,
version: NonNullConst<Version>,
buffer: NonNull<MutSpan<u8>>,
) -> Result<usize, Error>
unsafe fn as_string_short( &self, version: NonNullConst<Version>, buffer: NonNull<MutSpan<u8>>, ) -> Result<usize, Error>
Represents the version as a short string. Read more
Source§unsafe fn as_string_long(
&self,
version: NonNullConst<Version>,
buffer: NonNull<MutSpan<u8>>,
) -> Result<usize, Error>
unsafe fn as_string_long( &self, version: NonNullConst<Version>, buffer: NonNull<MutSpan<u8>>, ) -> Result<usize, Error>
Represents the version as a long string. Read more
Source§unsafe fn as_string_full(
&self,
version: NonNullConst<Version>,
buffer: NonNull<MutSpan<u8>>,
) -> Result<usize, Error>
unsafe fn as_string_full( &self, version: NonNullConst<Version>, buffer: NonNull<MutSpan<u8>>, ) -> Result<usize, Error>
Represents the version as a full string. Read more
Source§unsafe fn string_is_valid(
&self,
version_string: NonNullConst<ConstSpan<u8>>,
) -> Bool
unsafe fn string_is_valid( &self, version_string: NonNullConst<ConstSpan<u8>>, ) -> Bool
Checks whether the version string is valid. Read more
Source§unsafe fn compare(
&self,
lhs: NonNullConst<Version>,
rhs: NonNullConst<Version>,
) -> i32
unsafe fn compare( &self, lhs: NonNullConst<Version>, rhs: NonNullConst<Version>, ) -> i32
Compares two versions. Read more
Source§unsafe fn compare_weak(
&self,
lhs: NonNullConst<Version>,
rhs: NonNullConst<Version>,
) -> i32
unsafe fn compare_weak( &self, lhs: NonNullConst<Version>, rhs: NonNullConst<Version>, ) -> i32
Compares two versions. Read more
Source§unsafe fn compare_strong(
&self,
lhs: NonNullConst<Version>,
rhs: NonNullConst<Version>,
) -> i32
unsafe fn compare_strong( &self, lhs: NonNullConst<Version>, rhs: NonNullConst<Version>, ) -> i32
Compares two versions. Read more
Source§unsafe fn is_compatible(
&self,
lhs: NonNullConst<Version>,
rhs: NonNullConst<Version>,
) -> Bool
unsafe fn is_compatible( &self, lhs: NonNullConst<Version>, rhs: NonNullConst<Version>, ) -> Bool
Checks for compatibility of two versions. Read more
Auto Trait Implementations§
impl<'interface> Freeze for CBaseRef<'interface>
impl<'interface> RefUnwindSafe for CBaseRef<'interface>
impl<'interface> !Send for CBaseRef<'interface>
impl<'interface> !Sync for CBaseRef<'interface>
impl<'interface> Unpin for CBaseRef<'interface>
impl<'interface> UnwindSafe for CBaseRef<'interface>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<'interface, T> LibraryAPI<'interface> for Twhere
T: LibraryBinding,
impl<'interface, T> LibraryAPI<'interface> for Twhere
T: LibraryBinding,
Source§fn register_loader<'loader, LT, L>(
&mut self,
loader: &'loader LT,
lib_type: &impl AsRef<str>,
) -> Result<Loader<'interface, Owned>, Error>
fn register_loader<'loader, LT, L>( &mut self, loader: &'loader LT, lib_type: &impl AsRef<str>, ) -> Result<Loader<'interface, Owned>, Error>
Registers a new loader. Read more
Source§fn unregister_loader(&mut self, loader: Loader<'_, Owned>) -> Result<(), Error>
fn unregister_loader(&mut self, loader: Loader<'_, Owned>) -> Result<(), Error>
Unregisters an existing loader. Read more
Source§fn get_loader_interface<'loader, O, L>(
&mut self,
loader: &Loader<'loader, O>,
) -> Result<LibraryLoader<L, O>, Error>
fn get_loader_interface<'loader, O, L>( &mut self, loader: &Loader<'loader, O>, ) -> Result<LibraryLoader<L, O>, Error>
Fetches the interface of a library loader. Read more
Source§fn get_loader_handle_from_type(
&self,
lib_type: &impl AsRef<str>,
) -> Result<Loader<'interface, BorrowMutable<'_>>, Error>
fn get_loader_handle_from_type( &self, lib_type: &impl AsRef<str>, ) -> Result<Loader<'interface, BorrowMutable<'_>>, Error>
Fetches the loader handle associated with the library type. Read more
Source§fn get_loader_handle_from_library<'library, O>(
&self,
library: &Library<'library, O>,
) -> Result<Loader<'library, BorrowMutable<'_>>, Error>where
O: ImmutableAccessIdentifier,
fn get_loader_handle_from_library<'library, O>(
&self,
library: &Library<'library, O>,
) -> Result<Loader<'library, BorrowMutable<'_>>, Error>where
O: ImmutableAccessIdentifier,
Fetches the loader handle linked with the library handle. Read more
Source§fn get_num_loaders(&self) -> usize
fn get_num_loaders(&self) -> usize
Fetches the number of registered loaders. Read more
Source§fn library_exists<'library, O>(&self, library: &Library<'library, O>) -> boolwhere
O: ImmutableAccessIdentifier,
fn library_exists<'library, O>(&self, library: &Library<'library, O>) -> boolwhere
O: ImmutableAccessIdentifier,
Checks if a the library handle is valid. Read more
Source§fn type_exists(&self, lib_type: &impl AsRef<str>) -> Result<bool, Error>
fn type_exists(&self, lib_type: &impl AsRef<str>) -> Result<bool, Error>
Checks if a library type exists. Read more
Source§fn get_library_types(
&self,
buffer: impl AsMut<[StaticVec<u8, emf_core_base_rs_ffi::::library::LibraryType::{constant#0}>]>,
) -> Result<usize, Error>
fn get_library_types( &self, buffer: impl AsMut<[StaticVec<u8, emf_core_base_rs_ffi::::library::LibraryType::{constant#0}>]>, ) -> Result<usize, Error>
Copies the strings of the registered library types into a buffer. Read more
Source§unsafe fn create_library_handle(&mut self) -> Library<'interface, Owned>
unsafe fn create_library_handle(&mut self) -> Library<'interface, Owned>
Creates a new unlinked library handle. Read more
Source§unsafe fn remove_library_handle(
&mut self,
library: Library<'_, Owned>,
) -> Result<(), Error>
unsafe fn remove_library_handle( &mut self, library: Library<'_, Owned>, ) -> Result<(), Error>
Removes an existing library handle. Read more
Source§unsafe fn link_library<'library, 'loader, O, LO, IO>(
&mut self,
library: &Library<'library, O>,
loader: &Loader<'loader, LO>,
internal: &InternalLibrary<IO>,
) -> Result<(), Error>where
'loader: 'library,
O: MutableAccessIdentifier,
LO: ImmutableAccessIdentifier,
IO: ImmutableAccessIdentifier,
unsafe fn link_library<'library, 'loader, O, LO, IO>(
&mut self,
library: &Library<'library, O>,
loader: &Loader<'loader, LO>,
internal: &InternalLibrary<IO>,
) -> Result<(), Error>where
'loader: 'library,
O: MutableAccessIdentifier,
LO: ImmutableAccessIdentifier,
IO: ImmutableAccessIdentifier,
Links a library handle to an internal library handle. Read more
Source§fn get_internal_library_handle<'library, O>(
&self,
library: &Library<'library, O>,
) -> Result<InternalLibrary<O>, Error>where
O: ImmutableAccessIdentifier,
fn get_internal_library_handle<'library, O>(
&self,
library: &Library<'library, O>,
) -> Result<InternalLibrary<O>, Error>where
O: ImmutableAccessIdentifier,
Fetches the internal handle linked with the library handle. Read more
Source§fn load<O>(
&mut self,
loader: &Loader<'interface, O>,
path: &impl AsRef<Path>,
) -> Result<Library<'interface, Owned>, Error>where
O: MutableAccessIdentifier,
fn load<O>(
&mut self,
loader: &Loader<'interface, O>,
path: &impl AsRef<Path>,
) -> Result<Library<'interface, Owned>, Error>where
O: MutableAccessIdentifier,
Loads a library. The resulting handle is unique. Read more
Source§fn unload(&mut self, library: Library<'_, Owned>) -> Result<(), Error>
fn unload(&mut self, library: Library<'_, Owned>) -> Result<(), Error>
Unloads a library. Read more
Source§fn get_data_symbol<'library, 'handle, O, U>(
&self,
library: &'handle Library<'library, O>,
symbol: &impl AsRef<CStr>,
caster: impl FnOnce(NonNullConst<c_void>) -> &'library U,
) -> Result<Symbol<'handle, &'library U>, Error>where
O: ImmutableAccessIdentifier,
fn get_data_symbol<'library, 'handle, O, U>(
&self,
library: &'handle Library<'library, O>,
symbol: &impl AsRef<CStr>,
caster: impl FnOnce(NonNullConst<c_void>) -> &'library U,
) -> Result<Symbol<'handle, &'library U>, Error>where
O: ImmutableAccessIdentifier,
Fetches a data symbol from a library. Read more
Source§impl<'interface, T> ModuleAPI<'interface> for Twhere
T: ModuleBinding,
impl<'interface, T> ModuleAPI<'interface> for Twhere
T: ModuleBinding,
Source§fn register_loader<'loader, LT, L>(
&mut self,
loader: &'loader LT,
mod_type: &impl AsRef<str>,
) -> Result<Loader<'interface, Owned>, Error>
fn register_loader<'loader, LT, L>( &mut self, loader: &'loader LT, mod_type: &impl AsRef<str>, ) -> Result<Loader<'interface, Owned>, Error>
Registers a new module loader. Read more
Source§fn unregister_loader(&mut self, loader: Loader<'_, Owned>) -> Result<(), Error>
fn unregister_loader(&mut self, loader: Loader<'_, Owned>) -> Result<(), Error>
Unregisters an existing module loader. Read more
Source§fn get_loader_interface<'loader, O, L>(
&mut self,
loader: &Loader<'loader, O>,
) -> Result<ModuleLoader<L, O>, Error>
fn get_loader_interface<'loader, O, L>( &mut self, loader: &Loader<'loader, O>, ) -> Result<ModuleLoader<L, O>, Error>
Fetches the interface of a module loader. Read more
Source§fn get_loader_handle_from_type(
&self,
mod_type: &impl AsRef<str>,
) -> Result<Loader<'interface, BorrowMutable<'_>>, Error>
fn get_loader_handle_from_type( &self, mod_type: &impl AsRef<str>, ) -> Result<Loader<'interface, BorrowMutable<'_>>, Error>
Fetches the handle of the loader associated with a module type. Read more
Source§fn get_loader_handle_from_module<'module, O>(
&self,
module: &Module<'module, O>,
) -> Result<Loader<'module, BorrowMutable<'_>>, Error>where
O: ImmutableAccessIdentifier,
fn get_loader_handle_from_module<'module, O>(
&self,
module: &Module<'module, O>,
) -> Result<Loader<'module, BorrowMutable<'_>>, Error>where
O: ImmutableAccessIdentifier,
Fetches the handle of the loader linked with the module handle. Read more
Source§fn get_num_modules(&self) -> usize
fn get_num_modules(&self) -> usize
Fetches the number of loaded modules. Read more
Source§fn get_num_loaders(&self) -> usize
fn get_num_loaders(&self) -> usize
Fetches the number of loaders. Read more
Source§fn get_num_exported_interfaces(&self) -> usize
fn get_num_exported_interfaces(&self) -> usize
Fetches the number of exported interfaces. Read more
Source§fn module_exists<'module, O>(&self, module: &Module<'module, O>) -> boolwhere
O: ImmutableAccessIdentifier,
fn module_exists<'module, O>(&self, module: &Module<'module, O>) -> boolwhere
O: ImmutableAccessIdentifier,
Checks if a module exists. Read more
Source§fn type_exists(&self, mod_type: &impl AsRef<str>) -> Result<bool, Error>
fn type_exists(&self, mod_type: &impl AsRef<str>) -> Result<bool, Error>
Checks if a module type exists. Read more
Source§fn exported_interface_exists(&self, interface: &InterfaceDescriptor) -> bool
fn exported_interface_exists(&self, interface: &InterfaceDescriptor) -> bool
Checks whether an exported interface exists. Read more
Source§fn get_modules(
&self,
buffer: &mut impl AsMut<[ModuleInfo]>,
) -> Result<usize, Error>
fn get_modules( &self, buffer: &mut impl AsMut<[ModuleInfo]>, ) -> Result<usize, Error>
Copies the available module info into a buffer. Read more
Source§fn get_module_types(
&self,
buffer: &mut impl AsMut<[StaticVec<u8, emf_core_base_rs_ffi::::module::ModuleType::{constant#0}>]>,
) -> Result<usize, Error>
fn get_module_types( &self, buffer: &mut impl AsMut<[StaticVec<u8, emf_core_base_rs_ffi::::module::ModuleType::{constant#0}>]>, ) -> Result<usize, Error>
Copies the available module types into a buffer. Read more
Source§fn get_exported_interfaces(
&self,
buffer: &mut impl AsMut<[InterfaceDescriptor]>,
) -> Result<usize, Error>
fn get_exported_interfaces( &self, buffer: &mut impl AsMut<[InterfaceDescriptor]>, ) -> Result<usize, Error>
Copies the descriptors of the exported interfaces into a buffer. Read more
Source§fn get_exported_interface_handle(
&self,
interface: &InterfaceDescriptor,
) -> Result<Module<'interface, BorrowImmutable<'_>>, Error>
fn get_exported_interface_handle( &self, interface: &InterfaceDescriptor, ) -> Result<Module<'interface, BorrowImmutable<'_>>, Error>
Fetches the module handle of the exported interface. Read more
Source§unsafe fn create_module_handle(&mut self) -> Module<'interface, Owned>
unsafe fn create_module_handle(&mut self) -> Module<'interface, Owned>
Creates a new unlinked module handle. Read more
Source§unsafe fn remove_module_handle(
&mut self,
module: Module<'_, Owned>,
) -> Result<(), Error>
unsafe fn remove_module_handle( &mut self, module: Module<'_, Owned>, ) -> Result<(), Error>
Links a module handle to an internal module handle. Read more
Source§unsafe fn link_module<'module, 'loader, O, LO, IO>(
&mut self,
module: &Module<'module, O>,
loader: &Loader<'loader, LO>,
internal: &InternalModule<IO>,
) -> Result<(), Error>where
'loader: 'module,
O: MutableAccessIdentifier,
LO: ImmutableAccessIdentifier,
IO: ImmutableAccessIdentifier,
unsafe fn link_module<'module, 'loader, O, LO, IO>(
&mut self,
module: &Module<'module, O>,
loader: &Loader<'loader, LO>,
internal: &InternalModule<IO>,
) -> Result<(), Error>where
'loader: 'module,
O: MutableAccessIdentifier,
LO: ImmutableAccessIdentifier,
IO: ImmutableAccessIdentifier,
Links a module handle to an internal module handle. Read more
Source§fn get_internal_module_handle<'module, O>(
&self,
module: &Module<'module, O>,
) -> Result<InternalModule<O>, Error>where
O: ImmutableAccessIdentifier,
fn get_internal_module_handle<'module, O>(
&self,
module: &Module<'module, O>,
) -> Result<InternalModule<O>, Error>where
O: ImmutableAccessIdentifier,
Fetches the internal handle linked with the module handle. Read more
Source§fn add_module<O>(
&mut self,
loader: &Loader<'interface, O>,
path: &impl AsRef<Path>,
) -> Result<Module<'interface, Owned>, Error>where
O: MutableAccessIdentifier,
fn add_module<O>(
&mut self,
loader: &Loader<'interface, O>,
path: &impl AsRef<Path>,
) -> Result<Module<'interface, Owned>, Error>where
O: MutableAccessIdentifier,
Adds a new module. Read more
Source§fn remove_module(&mut self, module: Module<'_, Owned>) -> Result<(), Error>
fn remove_module(&mut self, module: Module<'_, Owned>) -> Result<(), Error>
Removes a module. Read more
Source§fn load<O>(&mut self, module: &mut Module<'_, O>) -> Result<(), Error>where
O: MutableAccessIdentifier,
fn load<O>(&mut self, module: &mut Module<'_, O>) -> Result<(), Error>where
O: MutableAccessIdentifier,
Loads a module. Read more
Source§fn unload<O>(&mut self, module: &mut Module<'_, O>) -> Result<(), Error>where
O: MutableAccessIdentifier,
fn unload<O>(&mut self, module: &mut Module<'_, O>) -> Result<(), Error>where
O: MutableAccessIdentifier,
Unloads a module. Read more
Source§fn initialize<O>(&mut self, module: &mut Module<'_, O>) -> Result<(), Error>where
O: MutableAccessIdentifier,
fn initialize<O>(&mut self, module: &mut Module<'_, O>) -> Result<(), Error>where
O: MutableAccessIdentifier,
Initializes a module. Read more
Source§fn terminate<O>(&mut self, module: &mut Module<'_, O>) -> Result<(), Error>where
O: MutableAccessIdentifier,
fn terminate<O>(&mut self, module: &mut Module<'_, O>) -> Result<(), Error>where
O: MutableAccessIdentifier,
Terminates a module. Read more
Source§fn add_dependency<O>(
&mut self,
module: &mut Module<'_, O>,
interface: &InterfaceDescriptor,
) -> Result<(), Error>where
O: MutableAccessIdentifier,
fn add_dependency<O>(
&mut self,
module: &mut Module<'_, O>,
interface: &InterfaceDescriptor,
) -> Result<(), Error>where
O: MutableAccessIdentifier,
Registers a new runtime dependency of the module. Read more
Source§fn remove_dependency<O>(
&mut self,
module: &mut Module<'_, O>,
interface: &InterfaceDescriptor,
) -> Result<(), Error>where
O: MutableAccessIdentifier,
fn remove_dependency<O>(
&mut self,
module: &mut Module<'_, O>,
interface: &InterfaceDescriptor,
) -> Result<(), Error>where
O: MutableAccessIdentifier,
Removes an existing runtime dependency from the module. Read more
Source§fn export_interface<O>(
&mut self,
module: &Module<'_, O>,
interface: &InterfaceDescriptor,
) -> Result<(), Error>where
O: ImmutableAccessIdentifier,
fn export_interface<O>(
&mut self,
module: &Module<'_, O>,
interface: &InterfaceDescriptor,
) -> Result<(), Error>where
O: ImmutableAccessIdentifier,
Exports an interface of a module. Read more
Source§fn get_load_dependencies<'module, O>(
&self,
module: &Module<'module, O>,
) -> Result<&'module [InterfaceDescriptor], Error>where
O: ImmutableAccessIdentifier,
fn get_load_dependencies<'module, O>(
&self,
module: &Module<'module, O>,
) -> Result<&'module [InterfaceDescriptor], Error>where
O: ImmutableAccessIdentifier,
Fetches the load dependencies of a module. Read more
Source§fn get_runtime_dependencies<'module, O>(
&self,
module: &Module<'module, O>,
) -> Result<&'module [InterfaceDescriptor], Error>where
O: ImmutableAccessIdentifier,
fn get_runtime_dependencies<'module, O>(
&self,
module: &Module<'module, O>,
) -> Result<&'module [InterfaceDescriptor], Error>where
O: ImmutableAccessIdentifier,
Fetches the runtime dependencies of a module. Read more
Source§fn get_exportable_interfaces<'module, O>(
&self,
module: &Module<'module, O>,
) -> Result<&'module [InterfaceDescriptor], Error>where
O: ImmutableAccessIdentifier,
fn get_exportable_interfaces<'module, O>(
&self,
module: &Module<'module, O>,
) -> Result<&'module [InterfaceDescriptor], Error>where
O: ImmutableAccessIdentifier,
Fetches the exportable interfaces of a module. Read more
Source§fn fetch_status<O>(&self, module: &Module<'_, O>) -> Result<ModuleStatus, Error>where
O: ImmutableAccessIdentifier,
fn fetch_status<O>(&self, module: &Module<'_, O>) -> Result<ModuleStatus, Error>where
O: ImmutableAccessIdentifier,
Fetches the load status of a module. Read more
Source§fn get_module_path<'module, O>(
&self,
module: &Module<'module, O>,
) -> Result<&'module [u8], Error>where
O: ImmutableAccessIdentifier,
fn get_module_path<'module, O>(
&self,
module: &Module<'module, O>,
) -> Result<&'module [u8], Error>where
O: ImmutableAccessIdentifier,
Fetches the path a module was loaded from. Read more
Source§fn get_module_info<'module, O>(
&self,
module: &Module<'module, O>,
) -> Result<&'module ModuleInfo, Error>where
O: ImmutableAccessIdentifier,
fn get_module_info<'module, O>(
&self,
module: &Module<'module, O>,
) -> Result<&'module ModuleInfo, Error>where
O: ImmutableAccessIdentifier,
Fetches the module info from a module. Read more
Source§fn get_interface<'module, O, IT>(
&self,
module: &'module Module<'_, O>,
interface: &InterfaceDescriptor,
caster: impl FnOnce(Interface) -> IT,
) -> Result<Interface<'module, IT>, Error>where
O: ImmutableAccessIdentifier,
fn get_interface<'module, O, IT>(
&self,
module: &'module Module<'_, O>,
interface: &InterfaceDescriptor,
caster: impl FnOnce(Interface) -> IT,
) -> Result<Interface<'module, IT>, Error>where
O: ImmutableAccessIdentifier,
Fetches an interface from a module. Read more
Source§impl<'interface, T> SysAPI<'interface> for Twhere
T: SysBinding,
impl<'interface, T> SysAPI<'interface> for Twhere
T: SysBinding,
Source§fn get_sync_handler<U>(&self) -> <U as SyncHandlerAPI<'interface>>::Handlerwhere
U: SyncHandlerAPI<'interface>,
fn get_sync_handler<U>(&self) -> <U as SyncHandlerAPI<'interface>>::Handlerwhere
U: SyncHandlerAPI<'interface>,
Fetches the active synchronization handler. Read more
Source§unsafe fn set_sync_handler(
&mut self,
handler: Option<&impl SyncHandlerAPI<'interface>>,
)
unsafe fn set_sync_handler( &mut self, handler: Option<&impl SyncHandlerAPI<'interface>>, )
Sets a new synchronization handler. Read more
Source§impl<'interface, T> SysAPIMin<'interface> for Twhere
T: SysBinding,
impl<'interface, T> SysAPIMin<'interface> for Twhere
T: SysBinding,
Source§impl<T> VersionAPI for Twhere
T: VersionBinding,
impl<T> VersionAPI for Twhere
T: VersionBinding,
Source§fn new_short(&self, major: i32, minor: i32, patch: i32) -> Version
fn new_short(&self, major: i32, minor: i32, patch: i32) -> Version
Constructs a new version. Read more
Source§fn new_long(
&self,
major: i32,
minor: i32,
patch: i32,
release_type: ReleaseType,
release_number: i8,
) -> Version
fn new_long( &self, major: i32, minor: i32, patch: i32, release_type: ReleaseType, release_number: i8, ) -> Version
Constructs a new version. Read more
Source§fn new_full(
&self,
major: i32,
minor: i32,
patch: i32,
release_type: ReleaseType,
release_number: i8,
build: i64,
) -> Version
fn new_full( &self, major: i32, minor: i32, patch: i32, release_type: ReleaseType, release_number: i8, build: i64, ) -> Version
Constructs a new version. Read more
Source§fn from_string(&self, buffer: impl AsRef<str>) -> Result<Version, Error>
fn from_string(&self, buffer: impl AsRef<str>) -> Result<Version, Error>
Constructs a version from a string. Read more
Source§fn string_length_short(&self, version: &Version) -> usize
fn string_length_short(&self, version: &Version) -> usize
Computes the length of the short version string. Read more
Source§fn string_length_long(&self, version: &Version) -> usize
fn string_length_long(&self, version: &Version) -> usize
Computes the length of the long version string. Read more
Source§fn string_length_full(&self, version: &Version) -> usize
fn string_length_full(&self, version: &Version) -> usize
Computes the length of the full version string. Read more
Source§fn as_string_short(
&self,
version: &Version,
buffer: impl AsMut<str>,
) -> Result<usize, Error>
fn as_string_short( &self, version: &Version, buffer: impl AsMut<str>, ) -> Result<usize, Error>
Represents the version as a short string. Read more
Source§fn as_string_long(
&self,
version: &Version,
buffer: impl AsMut<str>,
) -> Result<usize, Error>
fn as_string_long( &self, version: &Version, buffer: impl AsMut<str>, ) -> Result<usize, Error>
Represents the version as a long string. Read more
Source§fn as_string_full(
&self,
version: &Version,
buffer: impl AsMut<str>,
) -> Result<usize, Error>
fn as_string_full( &self, version: &Version, buffer: impl AsMut<str>, ) -> Result<usize, Error>
Represents the version as a full string. Read more
Source§fn string_is_valid(&self, version_string: impl AsRef<str>) -> bool
fn string_is_valid(&self, version_string: impl AsRef<str>) -> bool
Checks whether the version string is valid. Read more
Source§fn compare_weak(&self, lhs: &Version, rhs: &Version) -> Ordering
fn compare_weak(&self, lhs: &Version, rhs: &Version) -> Ordering
Compares two versions. Read more