pub struct Config {
pub include: Option<Vec<String>>,
pub exclude: Option<Vec<String>>,
pub rule: Vec<Rule>,
pub global_options: Options,
pub file_rule: Option<GlobRule>,
pub plugins: Option<HashMap<String, Plugin>>,
}Fields§
§include: Option<Vec<String>>Files to include.
A list of Unix-like glob path patterns.
Globstars (**) are supported.
Relative paths are not relative to the configuration file, but rather depends on the tool using the configuration.
Omitting this property includes all files, however an empty array will include none.
exclude: Option<Vec<String>>Files to exclude (ignore).
A list of Unix-like glob path patterns.
Globstars (**) are supported.
Relative paths are not relative to the configuration file, but rather depends on the tool using the configuration.
This has priority over include.
rule: Vec<Rule>Rules are used to override configurations by path and keys.
global_options: Options§file_rule: Option<GlobRule>§plugins: Option<HashMap<String, Plugin>>Implementations§
Source§impl Config
impl Config
Sourcepub fn prepare(
&mut self,
e: &impl Environment,
base: &Path,
) -> Result<(), Error>
pub fn prepare( &mut self, e: &impl Environment, base: &Path, ) -> Result<(), Error>
Prepare the configuration for further use.
pub fn is_included(&self, path: &Path) -> bool
pub fn rules_for<'r>( &'r self, path: &'r Path, ) -> impl DoubleEndedIterator<Item = &'r Rule> + Clone + 'r
pub fn update_format_options(&self, path: &Path, options: &mut Options)
pub fn format_scopes<'s>( &'s self, path: &'s Path, ) -> impl Iterator<Item = (&'s String, OptionsIncomplete)> + Clone + 's
pub fn is_schema_enabled(&self, path: &Path) -> bool
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
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 JsonSchema for Config
impl JsonSchema for Config
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
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 is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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