pub struct Library {
pub name: String,
pub version: Option<String>,
pub documentation: String,
pub namespaces: Vec<Namespace>,
pub language: Language,
}Fields§
§name: String§version: Option<String>§documentation: String§namespaces: Vec<Namespace>§language: LanguageImplementations§
Source§impl Library
impl Library
Sourcepub fn load(path: &Path, language: Option<Language>) -> Result<Self>
pub fn load(path: &Path, language: Option<Language>) -> Result<Self>
Load a library from a path.
Omitting the language argument will attempt to discover the language of the library by iterating over the supported languages, which can get very slow as we add more languages.
§Returns
Returns a Result containing the loaded library, or an error if something went wrong.
Auto Trait Implementations§
impl Freeze for Library
impl RefUnwindSafe for Library
impl Send for Library
impl Sync for Library
impl Unpin 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