pub enum IgnoreExportsUsedInFileConfig {
Bool(bool),
ByKind(IgnoreExportsUsedInFileByKind),
}Expand description
Controls whether exports referenced only inside their defining file are reported as unused exports.
Variants§
Bool(bool)
true suppresses both value and type exports that are referenced in
their defining file. false preserves the default cross-file behavior.
ByKind(IgnoreExportsUsedInFileByKind)
Knip-compatible fine-grained form. Fallow groups type aliases and
interfaces under unused_types, so either field enables type-export
suppression for same-file references.
Implementations§
Source§impl IgnoreExportsUsedInFileConfig
impl IgnoreExportsUsedInFileConfig
Sourcepub const fn is_enabled(self) -> bool
pub const fn is_enabled(self) -> bool
Whether this option can suppress at least one kind of export.
Sourcepub const fn suppresses(self, is_type_only: bool) -> bool
pub const fn suppresses(self, is_type_only: bool) -> bool
Whether same-file references should suppress this export kind.
Trait Implementations§
Source§impl Clone for IgnoreExportsUsedInFileConfig
impl Clone for IgnoreExportsUsedInFileConfig
Source§fn clone(&self) -> IgnoreExportsUsedInFileConfig
fn clone(&self) -> IgnoreExportsUsedInFileConfig
Returns a duplicate 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<'de> Deserialize<'de> for IgnoreExportsUsedInFileConfig
impl<'de> Deserialize<'de> for IgnoreExportsUsedInFileConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<IgnoreExportsUsedInFileByKind> for IgnoreExportsUsedInFileConfig
impl From<IgnoreExportsUsedInFileByKind> for IgnoreExportsUsedInFileConfig
Source§fn from(value: IgnoreExportsUsedInFileByKind) -> Self
fn from(value: IgnoreExportsUsedInFileByKind) -> Self
Converts to this type from the input type.
Source§impl From<bool> for IgnoreExportsUsedInFileConfig
impl From<bool> for IgnoreExportsUsedInFileConfig
Source§impl JsonSchema for IgnoreExportsUsedInFileConfig
impl JsonSchema for IgnoreExportsUsedInFileConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for IgnoreExportsUsedInFileConfig
impl PartialEq for IgnoreExportsUsedInFileConfig
Source§fn eq(&self, other: &IgnoreExportsUsedInFileConfig) -> bool
fn eq(&self, other: &IgnoreExportsUsedInFileConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for IgnoreExportsUsedInFileConfig
impl Eq for IgnoreExportsUsedInFileConfig
impl StructuralPartialEq for IgnoreExportsUsedInFileConfig
Auto Trait Implementations§
impl Freeze for IgnoreExportsUsedInFileConfig
impl RefUnwindSafe for IgnoreExportsUsedInFileConfig
impl Send for IgnoreExportsUsedInFileConfig
impl Sync for IgnoreExportsUsedInFileConfig
impl Unpin for IgnoreExportsUsedInFileConfig
impl UnsafeUnpin for IgnoreExportsUsedInFileConfig
impl UnwindSafe for IgnoreExportsUsedInFileConfig
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