Struct ra_ap_project_model::Sysroot 
source · pub struct Sysroot { /* private fields */ }Implementations
sourceimpl 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 = (&'static str, Idx<SysrootCrateData>, bool)> + '_
pub fn proc_macro(&self) -> Option<Idx<SysrootCrateData>>
pub fn crates(
    &self
) -> impl Iterator<Item = Idx<SysrootCrateData>> + ExactSizeIterator + '_
sourceimpl 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_rustc(
    cargo_toml: &ManifestPath,
    extra_env: &FxHashMap<String, String>
) -> Option<ManifestPath>
pub fn with_sysroot_dir(sysroot_dir: AbsPathBuf) -> Result<Sysroot>
pub fn load(
    sysroot_dir: AbsPathBuf,
    sysroot_src_dir: AbsPathBuf
) -> Result<Sysroot>
Trait Implementations
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
sourceimpl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
    Q: Eq + ?Sized,
    K: Borrow<Q> + ?Sized,
 
impl<Q, K> Equivalent<K> for Qwhere
    Q: Eq + ?Sized,
    K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
Compare self to 
key and return true if they are equal.