pub struct LoadedModule {
pub output_path: PathBuf,
pub header_path: Option<PathBuf>,
pub bindings: Option<GeneratedBinding>,
pub language: Language,
pub source_path: PathBuf,
pub exports: Vec<String>,
pub export_source: ExportSource,
pub warnings: Vec<String>,
pub imports: Vec<GeneratedImport>,
}Expand description
Result of loading a foreign module.
Fields§
§output_path: PathBufPath to the compiled output (C file or object)
header_path: Option<PathBuf>Path to the generated header (if any)
bindings: Option<GeneratedBinding>The generated Rust bindings
language: LanguageThe language that was loaded
source_path: PathBufPath to the original source
exports: Vec<String>§export_source: ExportSource§warnings: Vec<String>§imports: Vec<GeneratedImport>Implementations§
Source§impl LoadedModule
impl LoadedModule
Sourcepub fn bindings_code(&self) -> Option<&str>
pub fn bindings_code(&self) -> Option<&str>
Get the binding code if available.
Trait Implementations§
Source§impl Clone for LoadedModule
impl Clone for LoadedModule
Source§fn clone(&self) -> LoadedModule
fn clone(&self) -> LoadedModule
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LoadedModule
impl RefUnwindSafe for LoadedModule
impl Send for LoadedModule
impl Sync for LoadedModule
impl Unpin for LoadedModule
impl UnsafeUnpin for LoadedModule
impl UnwindSafe for LoadedModule
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more