pub(super) struct ModDir {
dir_path: DirPath,
root_non_dir_owner: bool,
depth: u32,
}Fields§
§dir_path: DirPath`` for mod.rs, lib.rs
foo/ for foo.rs
foo/bar/ for mod bar { mod x; } nested in foo.rs
Invariant: path.is_empty() || path.ends_with(‘/’)
root_non_dir_owner: boolinside ./foo.rs, mods with #[path] should not be relative to ./foo/
depth: u32Implementations§
Source§impl ModDir
impl ModDir
pub(super) fn root() -> ModDir
pub(super) fn descend_into_definition( &self, name: &Name, attr_path: Option<&str>, ) -> Option<ModDir>
fn child(&self, dir_path: DirPath, root_non_dir_owner: bool) -> Option<ModDir>
pub(super) fn resolve_declaration( &self, db: &dyn SourceDatabase, file_id: HirFileId, name: &Name, attr_path: Option<&str>, ) -> Result<(EditionedFileId, bool, ModDir), Box<[String]>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ModDir
impl RefUnwindSafe for ModDir
impl Send for ModDir
impl Sync for ModDir
impl Unpin for ModDir
impl UnsafeUnpin for ModDir
impl UnwindSafe for ModDir
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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