pub struct CScriptLibrary { /* private fields */ }Expand description
One loaded shared library’s three FFI entry points. Kept alive for as long as any
CScriptInstance built from it exists (each instance holds an Arc to this) — the
Library must outlive every raw function pointer taken from it.
Implementations§
Source§impl CScriptLibrary
impl CScriptLibrary
Sourcepub fn load(path: &Path) -> Result<Self, CScriptError>
pub fn load(path: &Path) -> Result<Self, CScriptError>
Loads path and resolves cscript_start (always required) plus every optional symbol
this crate knows about (cscript_output, cscript_derivative, cscript_output_xc,
cscript_update, cscript_free, cscript_clone) — see the module doc comment for what
each one’s absence means. Which combination is actually required for a given
instantiation is checked separately, by
CScriptRegistry::instantiate/CScriptRegistry::instantiate_xc.
Auto Trait Implementations§
impl Freeze for CScriptLibrary
impl RefUnwindSafe for CScriptLibrary
impl Send for CScriptLibrary
impl Sync for CScriptLibrary
impl Unpin for CScriptLibrary
impl UnsafeUnpin for CScriptLibrary
impl UnwindSafe for CScriptLibrary
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