pub struct StdLib {
pub path: PathBuf,
pub manifest: Manifest,
}Expand description
An instance of the standard library.
Fields§
§path: PathBufPath of the library which manifest.toml.
manifest: ManifestThe parsed manifest.
Implementations§
Source§impl StdLib
impl StdLib
Sourcepub fn new(path: impl AsRef<Path>) -> Result<Self, StdLibError>
pub fn new(path: impl AsRef<Path>) -> Result<Self, StdLibError>
Create a new standard library instance from a path.
Installs the standard library, if it is not installed.
Sourcepub fn reinstall(force: bool) -> Result<Manifest, StdLibError>
pub fn reinstall(force: bool) -> Result<Manifest, StdLibError>
Try to reinstall into default path.
Sourcepub fn default_path() -> PathBuf
pub fn default_path() -> PathBuf
Global library search path + ./std.
Auto Trait Implementations§
impl Freeze for StdLib
impl RefUnwindSafe for StdLib
impl Send for StdLib
impl Sync for StdLib
impl Unpin for StdLib
impl UnwindSafe for StdLib
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