pub struct ExternRegistry { /* private fields */ }Expand description
Registry for external function declarations.
Implementations§
Source§impl ExternRegistry
impl ExternRegistry
Sourcepub fn register(&mut self, decl: ExternDecl) -> Result<(), FfiError>
pub fn register(&mut self, decl: ExternDecl) -> Result<(), FfiError>
Register an external function declaration.
Sourcepub fn lookup(&self, name: &Name) -> Result<&ExternDecl, FfiError>
pub fn lookup(&self, name: &Name) -> Result<&ExternDecl, FfiError>
Look up a declaration by OxiLean name.
Sourcepub fn lookup_by_symbol(
&self,
lib_name: &str,
symbol_name: &str,
) -> Result<&ExternDecl, FfiError>
pub fn lookup_by_symbol( &self, lib_name: &str, symbol_name: &str, ) -> Result<&ExternDecl, FfiError>
Look up a declaration by symbol name.
Sourcepub fn validate_all(&self) -> Result<(), FfiError>
pub fn validate_all(&self) -> Result<(), FfiError>
Validate all registered declarations.
Sourcepub fn all_decls(&self) -> impl Iterator<Item = &ExternDecl>
pub fn all_decls(&self) -> impl Iterator<Item = &ExternDecl>
Get all registered declarations.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ExternRegistry
impl RefUnwindSafe for ExternRegistry
impl Send for ExternRegistry
impl Sync for ExternRegistry
impl Unpin for ExternRegistry
impl UnsafeUnpin for ExternRegistry
impl UnwindSafe for ExternRegistry
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