pub struct ProjectContext<'l> { /* private fields */ }Expand description
Overall linter context for a project.
Implementations§
Source§impl<'l> ProjectContext<'l>
impl<'l> ProjectContext<'l>
pub fn new(core: &'l XCoreContext) -> Self
Sourcepub fn core(&self) -> &'l XCoreContext
pub fn core(&self) -> &'l XCoreContext
Returns the core context.
Sourcepub fn project_root(&self) -> &'l Path
pub fn project_root(&self) -> &'l Path
Returns the project root.
Sourcepub fn package_graph(&self) -> Result<&'l PackageGraph>
pub fn package_graph(&self) -> Result<&'l PackageGraph>
Returns the package graph, computing it for the first time if necessary.
Sourcepub fn full_path(&self, path: impl AsRef<Path>) -> PathBuf
pub fn full_path(&self, path: impl AsRef<Path>) -> PathBuf
Returns the absolute path from the project root.
Sourcepub fn default_members(&self) -> Result<&WorkspaceSubset<'_>>
pub fn default_members(&self) -> Result<&WorkspaceSubset<'_>>
Returns information about the default workspace members.
This includes all packages included by default in the default workspace members, but not those that Cargo would ignore.
Trait Implementations§
Auto Trait Implementations§
impl<'l> Freeze for ProjectContext<'l>
impl<'l> RefUnwindSafe for ProjectContext<'l>
impl<'l> Send for ProjectContext<'l>
impl<'l> Sync for ProjectContext<'l>
impl<'l> Unpin for ProjectContext<'l>
impl<'l> UnsafeUnpin for ProjectContext<'l>
impl<'l> UnwindSafe for ProjectContext<'l>
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> 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