[][src]Struct taplo_cli::config::Rule

pub struct Rule {
    pub name: Option<String>,
    pub include: Option<Vec<String>>,
    pub exclude: Option<Vec<String>>,
    pub keys: Option<Vec<String>>,
    pub options: Options,
}

A rule to override options by either name or file.

Fields

name: Option<String>

The name of the rule.

Used in taplo::<name> comments.

include: Option<Vec<String>>

Files this rule is valid for.

A list of Unix-like glob path patterns.

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 that are excluded from this rule.

A list of Unix-like glob path patterns.

Relative paths are not relative to the configuration file, but rather depends on the tool using the configuration.

This has priority over include.

keys: Option<Vec<String>>

Keys the rule is valid for in a document.

A list of Unix-like glob dotted key patterns.

This allows enabling the rule for specific paths in the document.

For example:

  • package.metadata will enable the rule for everything inside the package.metadata table, including itself.

If omitted, the rule will always be valid for all keys.

options: Options

Trait Implementations

impl Clone for Rule[src]

impl Debug for Rule[src]

impl Default for Rule[src]

impl<'de> Deserialize<'de> for Rule[src]

impl Eq for Rule[src]

impl JsonSchema for Rule[src]

impl PartialEq<Rule> for Rule[src]

impl Serialize for Rule[src]

impl StructuralEq for Rule[src]

impl StructuralPartialEq for Rule[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> DynClone for T where
    T: Clone
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.