Struct x_lint::project::ProjectContext
source · 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 project_root(&self) -> &'l Utf8Path
pub fn project_root(&self) -> &'l Utf8Path
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<Utf8Path>) -> Utf8PathBuf
pub fn full_path(&self, path: impl AsRef<Utf8Path>) -> Utf8PathBuf
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> RefUnwindSafe for ProjectContext<'l>
impl<'l> Send for ProjectContext<'l>
impl<'l> Sync for ProjectContext<'l>
impl<'l> Unpin for ProjectContext<'l>
impl<'l> UnwindSafe for ProjectContext<'l>
Blanket Implementations§
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> SafeBorrow<T> for Twhere
T: ?Sized,
impl<T> SafeBorrow<T> for Twhere T: ?Sized,
§fn borrow_replacement(ptr: &T) -> &T
fn borrow_replacement(ptr: &T) -> &T
Given
ptr
, which was obtained from a prior call to Self::borrow()
,
return a value with the same nominal lifetime which is guaranteed to
survive mutations to Self
. Read more