Struct ra_ap_ide::SourceRoot [−]
pub struct SourceRoot { pub is_library: bool, // some fields omitted }
Fields
is_library: bool
Sysroot or crates.io library.
Libraries are considered mostly immutable, this assumption is used to optimize salsa’s query structure
Implementations
impl SourceRoot
impl SourceRoot
pub fn new_local(file_set: FileSet) -> SourceRoot
pub fn new_library(file_set: FileSet) -> SourceRoot
pub fn path_for_file(&self, file: &FileId) -> Option<&VfsPath>
pub fn file_for_path(&self, path: &VfsPath) -> Option<&FileId>
Trait Implementations
impl Clone for SourceRoot
impl Clone for SourceRoot
pub fn clone(&self) -> SourceRoot
pub fn clone(&self) -> SourceRoot
Returns a copy of the value. Read more
Performs copy-assignment from source
. Read more
impl Debug for SourceRoot
impl Debug for SourceRoot
impl PartialEq<SourceRoot> for SourceRoot
impl PartialEq<SourceRoot> for SourceRoot
pub fn eq(&self, other: &SourceRoot) -> bool
pub fn eq(&self, other: &SourceRoot) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
pub fn ne(&self, other: &SourceRoot) -> bool
pub fn ne(&self, other: &SourceRoot) -> bool
This method tests for !=
.
impl Eq for SourceRoot
impl StructuralEq for SourceRoot
impl StructuralPartialEq for SourceRoot
Auto Trait Implementations
impl RefUnwindSafe for SourceRoot
impl Send for SourceRoot
impl Sync for SourceRoot
impl Unpin for SourceRoot
impl UnwindSafe for SourceRoot
Blanket Implementations
Mutably borrows from an owned value. Read more
fn cast<U>(self, interner: &<U as HasInterner>::Interner) -> U where
Self: CastTo<U>,
U: HasInterner,
fn cast<U>(self, interner: &<U as HasInterner>::Interner) -> U where
Self: CastTo<U>,
U: HasInterner,
Cast a value to type U
using CastTo
.
Compare self to key
and return true
if they are equal.
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
impl<T> Any for T where
T: Any,