Struct ra_ap_project_model::Sysroot
source · pub struct Sysroot {
pub hack_cargo_workspace: Option<CargoWorkspace>,
/* private fields */
}Fields§
§hack_cargo_workspace: Option<CargoWorkspace>Stores the result of cargo metadata of the RA_UNSTABLE_SYSROOT_HACK workspace.
Implementations§
source§impl Sysroot
impl Sysroot
sourcepub fn root(&self) -> &AbsPath
pub fn root(&self) -> &AbsPath
Returns sysroot “root” directory, where bin/, etc/, lib/, libexec/
subfolder live, like:
$HOME/.rustup/toolchains/nightly-2022-07-23-x86_64-unknown-linux-gnu
sourcepub fn src_root(&self) -> &AbsPath
pub fn src_root(&self) -> &AbsPath
Returns the sysroot “source” directory, where stdlib sources are located, like:
$HOME/.rustup/toolchains/nightly-2022-07-23-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library
pub fn public_deps( &self ) -> impl Iterator<Item = (CrateName, Idx<SysrootCrateData>, bool)> + '_
pub fn proc_macro(&self) -> Option<Idx<SysrootCrateData>>
pub fn crates( &self ) -> impl Iterator<Item = Idx<SysrootCrateData>> + ExactSizeIterator + '_
pub fn is_empty(&self) -> bool
pub fn loading_warning(&self) -> Option<String>
source§impl Sysroot
impl Sysroot
sourcepub fn discover(
dir: &AbsPath,
extra_env: &FxHashMap<String, String>
) -> Result<Sysroot>
pub fn discover( dir: &AbsPath, extra_env: &FxHashMap<String, String> ) -> Result<Sysroot>
Attempts to discover the toolchain’s sysroot from the given dir.
pub fn discover_with_src_override( current_dir: &AbsPath, extra_env: &FxHashMap<String, String>, src: AbsPathBuf ) -> Result<Sysroot>
pub fn discover_rustc_src(&self) -> Option<ManifestPath>
pub fn discover_rustc(&self) -> Result<AbsPathBuf, Error>
pub fn with_sysroot_dir(sysroot_dir: AbsPathBuf) -> Result<Sysroot>
pub fn load(sysroot_dir: AbsPathBuf, sysroot_src_dir: AbsPathBuf) -> Sysroot
Trait Implementations§
source§impl PartialEq for Sysroot
impl PartialEq for Sysroot
impl Eq for Sysroot
impl StructuralEq for Sysroot
impl StructuralPartialEq for Sysroot
Auto Trait Implementations§
impl RefUnwindSafe for Sysroot
impl Send for Sysroot
impl Sync for Sysroot
impl Unpin for Sysroot
impl UnwindSafe for Sysroot
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.