pub struct StructuredConfig {
pub settings: Vec<Setting>,
}Expand description
A structure for defining which rules to be enabled or disabled in a
LintGroup.
So named because it represents a more structured view for organizing rules.
Designed to be something that can be converted into a FlatConfig at runtime before
being passed to an actual LintGroup
Fields§
§settings: Vec<Setting>Implementations§
Source§impl StructuredConfig
impl StructuredConfig
Sourcepub fn validate(&self) -> bool
pub fn validate(&self) -> bool
Validate that the structure of the settings is valid.
Returns true if it is valid and false otherwise.
Sourcepub fn to_flat_config(&self) -> Option<FlatConfig>
pub fn to_flat_config(&self) -> Option<FlatConfig>
Creates a FlatConfig that represents these settings.
Will return None if self is invalid.
Sourcepub fn copy_from_flat_config(&mut self, config: &FlatConfig)
pub fn copy_from_flat_config(&mut self, config: &FlatConfig)
Fills in the relevant values from a FlatConfig according to the relevant name
fields.
Trait Implementations§
Source§impl Clone for StructuredConfig
impl Clone for StructuredConfig
Source§fn clone(&self) -> StructuredConfig
fn clone(&self) -> StructuredConfig
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 Debug for StructuredConfig
impl Debug for StructuredConfig
Source§impl PartialEq for StructuredConfig
impl PartialEq for StructuredConfig
impl Eq for StructuredConfig
impl StructuralPartialEq for StructuredConfig
Auto Trait Implementations§
impl Freeze for StructuredConfig
impl RefUnwindSafe for StructuredConfig
impl Send for StructuredConfig
impl Sync for StructuredConfig
impl Unpin for StructuredConfig
impl UnsafeUnpin for StructuredConfig
impl UnwindSafe for StructuredConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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