pub struct Library { /* private fields */ }Expand description
A loaded library of compiled vector environments.
Implementations§
Source§impl Library
impl Library
Sourcepub unsafe fn open(path: impl AsRef<Path>) -> Result<Self, DylibError>
pub unsafe fn open(path: impl AsRef<Path>) -> Result<Self, DylibError>
Loads a library that exports VTABLE_SYMBOL.
§Errors
Returns an error if the library cannot be loaded, has no table, or has another ABI version.
§Safety
Loading runs the library’s initialization code, and the library must
implement the ABI of this module (one built with
export_vec_envs!).
Sourcepub fn create(
&self,
module: &str,
num_envs: usize,
seed: i64,
) -> Result<LibVecEnv, DylibError>
pub fn create( &self, module: &str, num_envs: usize, seed: i64, ) -> Result<LibVecEnv, DylibError>
Creates num_envs environments of module and resets them, with the
keys of CompiledVecEnv::new.
§Errors
Returns an error if the library has no such module.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Library
impl RefUnwindSafe for Library
impl Send for Library
impl Sync for Library
impl Unpin for Library
impl UnsafeUnpin for Library
impl UnwindSafe for Library
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