pub struct PythonSourceRootModule {
pub file: ProjectFile,
pub source_root: PathBuf,
}Expand description
A module whose project-root name ends with an absolute specifier, and the source root that spelling would have to be written against.
This is candidate evidence, not binding evidence: a tail match only says the
file could be the module if its implied root were on the importing program’s
path. PythonModuleSpellings::establishes_source_root decides whether the
workspace’s own structure makes that root real, and only an established
candidate ever binds.
Fields§
§file: ProjectFile§source_root: PathBufThe directory the specifier is resolved against: file’s relative path
with the specifier’s own components removed. Never empty, because the
project root is the spelling the module index already answers exactly.
Trait Implementations§
Source§impl Clone for PythonSourceRootModule
impl Clone for PythonSourceRootModule
Auto Trait Implementations§
impl Freeze for PythonSourceRootModule
impl RefUnwindSafe for PythonSourceRootModule
impl Send for PythonSourceRootModule
impl Sync for PythonSourceRootModule
impl Unpin for PythonSourceRootModule
impl UnsafeUnpin for PythonSourceRootModule
impl UnwindSafe for PythonSourceRootModule
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more