pub struct PathConfig {
pub enabled: bool,
pub paths: Vec<String>,
}Expand description
The [index] table of .malt.toml.
Fields§
§enabled: boolWhether the linter uses the index (default: no). The index only adds findings that MATLAB’s Code Analyzer does not make; this crate ignores it.
paths: Vec<String>Folders to search: plain folders or glob patterns (see the module docs). Empty means the working directory alone.
Implementations§
Source§impl PathConfig
impl PathConfig
Sourcepub fn from_toml(content: &str) -> Result<Self, IndexError>
pub fn from_toml(content: &str) -> Result<Self, IndexError>
Parse the [index] table of a .malt.toml’s content. Other tables are ignored.
Sourcepub fn load(dir: &Path) -> Result<Self, IndexError>
pub fn load(dir: &Path) -> Result<Self, IndexError>
Read dir/.malt.toml. A missing file is the empty configuration.
Trait Implementations§
Source§impl Clone for PathConfig
impl Clone for PathConfig
Source§impl Debug for PathConfig
impl Debug for PathConfig
Source§impl Default for PathConfig
impl Default for PathConfig
Source§impl<'de> Deserialize<'de> for PathConfigwhere
PathConfig: Default,
impl<'de> Deserialize<'de> for PathConfigwhere
PathConfig: Default,
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
impl Eq for PathConfig
Source§impl PartialEq for PathConfig
impl PartialEq for PathConfig
impl StructuralPartialEq for PathConfig
Auto Trait Implementations§
impl Forget for PathConfig
impl Freeze for PathConfig
impl Move for PathConfig
impl RefUnwindSafe for PathConfig
impl Send for PathConfig
impl Sync for PathConfig
impl Unpin for PathConfig
impl UnsafeUnpin for PathConfig
impl UnwindSafe for PathConfig
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.