pub struct LeanLibraryDependency { /* private fields */ }Expand description
Dependency dylib that must stay alive while a capability is loaded.
Implementations§
Source§impl LeanLibraryDependency
impl LeanLibraryDependency
Sourcepub fn path(path: impl Into<PathBuf>) -> LeanLibraryDependency
pub fn path(path: impl Into<PathBuf>) -> LeanLibraryDependency
Add a dependency dylib to the bundle.
Sourcepub fn export_symbols_for_dependents(self) -> LeanLibraryDependency
pub fn export_symbols_for_dependents(self) -> LeanLibraryDependency
Make this dependency’s Lean symbols available to later dylibs in the same bundle.
This is a capability-level requirement, not a platform-loader flag in the public contract. On ELF platforms it maps to global symbol visibility; other platforms use the equivalent behavior provided by the native loader.
Sourcepub fn initializer(
self,
package: impl Into<String>,
module: impl Into<String>,
) -> LeanLibraryDependency
pub fn initializer( self, package: impl Into<String>, module: impl Into<String>, ) -> LeanLibraryDependency
Initialize a module from this dependency after it is opened.
Sourcepub fn exports_symbols_for_dependents(&self) -> bool
pub fn exports_symbols_for_dependents(&self) -> bool
Whether symbols from this dependency are exported to later bundle members.
Sourcepub fn module_initializer(&self) -> Option<&LeanModuleInitializer>
pub fn module_initializer(&self) -> Option<&LeanModuleInitializer>
Optional module initializer for this dependency.
Sourcepub fn into_module_initializer(self) -> Option<LeanModuleInitializer>
pub fn into_module_initializer(self) -> Option<LeanModuleInitializer>
Consume the dependency and return its module initializer, if any.
Used by the runtime opener (lean-rs) to take owned ownership of the
initializer when opening the bundle, without re-cloning the strings.
Trait Implementations§
Source§impl Clone for LeanLibraryDependency
impl Clone for LeanLibraryDependency
Source§fn clone(&self) -> LeanLibraryDependency
fn clone(&self) -> LeanLibraryDependency
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LeanLibraryDependency
impl Debug for LeanLibraryDependency
Source§impl PartialEq for LeanLibraryDependency
impl PartialEq for LeanLibraryDependency
Source§fn eq(&self, other: &LeanLibraryDependency) -> bool
fn eq(&self, other: &LeanLibraryDependency) -> bool
self and other values to be equal, and is used by ==.