pub struct LintScopes { /* private fields */ }Expand description
The effective levels of every directory the loader resolved: the workspace root, each member, or a standalone package (ADR-0024 decision 10). A file is looked up by the longest directory that is a prefix of its path.
Implementations§
Source§impl LintScopes
impl LintScopes
Sourcepub fn insert(&mut self, dir: PathBuf, levels: LintLevels)
pub fn insert(&mut self, dir: PathBuf, levels: LintLevels)
Records levels as the effective levels of dir and every path under
dir, until a longer scope takes over.
Sourcepub fn for_path(&self, path: &Path) -> Option<&LintLevels>
pub fn for_path(&self, path: &Path) -> Option<&LintLevels>
The levels of the longest scope directory that is a prefix of path,
compared component by component (/ws/a is not a prefix of
/ws/ab/x.ridl), or None when no scope contains path.
Trait Implementations§
Source§impl Clone for LintScopes
impl Clone for LintScopes
Source§impl Debug for LintScopes
impl Debug for LintScopes
Auto Trait Implementations§
impl Freeze for LintScopes
impl RefUnwindSafe for LintScopes
impl Send for LintScopes
impl Sync for LintScopes
impl Unpin for LintScopes
impl UnsafeUnpin for LintScopes
impl UnwindSafe for LintScopes
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> 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