pub enum ManifestFor<'a> {
Package(&'a Package),
Workspace(&'a MaybePackage),
}Expand description
Scope at which a lint runs: package-level or workspace-level.
Variants§
Package(&'a Package)
Lint runs for a specific package.
Workspace(&'a MaybePackage)
Lint runs for workspace-level config.
Implementations§
Source§impl ManifestFor<'_>
impl ManifestFor<'_>
fn lint_level( &self, pkg_lints: &TomlToolLints, lint: Lint, ) -> (LintLevel, LintLevelReason)
pub fn contents(&self) -> &str
pub fn document(&self) -> &Spanned<DeTable<'static>>
pub fn edition(&self) -> Edition
pub fn unstable_features(&self) -> &Features
Trait Implementations§
Source§impl<'a> From<&'a MaybePackage> for ManifestFor<'a>
impl<'a> From<&'a MaybePackage> for ManifestFor<'a>
Source§fn from(value: &'a MaybePackage) -> ManifestFor<'a>
fn from(value: &'a MaybePackage) -> ManifestFor<'a>
Converts to this type from the input type.
Source§impl<'a> From<&'a Package> for ManifestFor<'a>
impl<'a> From<&'a Package> for ManifestFor<'a>
Source§fn from(value: &'a Package) -> ManifestFor<'a>
fn from(value: &'a Package) -> ManifestFor<'a>
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a> Freeze for ManifestFor<'a>
impl<'a> RefUnwindSafe for ManifestFor<'a>
impl<'a> !Send for ManifestFor<'a>
impl<'a> !Sync for ManifestFor<'a>
impl<'a> Unpin for ManifestFor<'a>
impl<'a> UnwindSafe for ManifestFor<'a>
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoEither for T
impl<T> IntoEither for T
§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 more§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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 16 bytes
Size for each variant:
Package: 8 bytesWorkspace: 8 bytes