Struct x_lint::package::PackageContext
source · pub struct PackageContext<'l> { /* private fields */ }
Expand description
Lint context for an individual package.
Implementations§
source§impl<'l> PackageContext<'l>
impl<'l> PackageContext<'l>
pub fn new( project_ctx: &'l ProjectContext<'l>, package_graph: &'l PackageGraph, workspace_path: &'l Utf8Path, metadata: PackageMetadata<'l> ) -> Result<Self>
sourcepub fn project_ctx(&self) -> &'l ProjectContext<'l>
pub fn project_ctx(&self) -> &'l ProjectContext<'l>
Returns the project context.
sourcepub fn package_graph(&self) -> &'l PackageGraph
pub fn package_graph(&self) -> &'l PackageGraph
Returns the package graph.
sourcepub fn workspace_path(&self) -> &'l Utf8Path
pub fn workspace_path(&self) -> &'l Utf8Path
Returns the relative path for this package in the workspace.
sourcepub fn is_default_member(&self) -> bool
pub fn is_default_member(&self) -> bool
Returns true if this is a default member of this workspace.
Trait Implementations§
source§impl<'l> Clone for PackageContext<'l>
impl<'l> Clone for PackageContext<'l>
source§fn clone(&self) -> PackageContext<'l>
fn clone(&self) -> PackageContext<'l>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'l> Debug for PackageContext<'l>
impl<'l> Debug for PackageContext<'l>
impl<'l> Copy for PackageContext<'l>
Auto Trait Implementations§
impl<'l> RefUnwindSafe for PackageContext<'l>
impl<'l> Send for PackageContext<'l>
impl<'l> Sync for PackageContext<'l>
impl<'l> Unpin for PackageContext<'l>
impl<'l> UnwindSafe for PackageContext<'l>
Blanket Implementations§
§impl<'a, T> DefaultFeatures<'a> for Twhere
T: 'a + Send + Sync + Clone,
impl<'a, T> DefaultFeatures<'a> for Twhere T: 'a + Send + Sync + Clone,
§fn clone_boxed(&self) -> Box<dyn DefaultFeatures<'a> + 'a, Global>
fn clone_boxed(&self) -> Box<dyn DefaultFeatures<'a> + 'a, Global>
Clone this value, and then immediately put it into a
Box
behind a trait object of this trait.§fn self_address_mut(&mut self) -> *mut ()
fn self_address_mut(&mut self) -> *mut ()
Returns the address of
self
. Read more§impl<'a, T> NonSyncFeatures<'a> for Twhere
T: 'a + Clone,
impl<'a, T> NonSyncFeatures<'a> for Twhere T: 'a + Clone,
§fn clone_boxed(&self) -> Box<dyn NonSyncFeatures<'a> + 'a, Global>
fn clone_boxed(&self) -> Box<dyn NonSyncFeatures<'a> + 'a, Global>
Clone this value, and then immediately put it into a
Box
behind a trait object of this trait.§fn self_address_mut(&mut self) -> *mut ()
fn self_address_mut(&mut self) -> *mut ()
Returns the address of
self
. Read more§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