pub struct LintConfig { /* private fields */ }Expand description
Resolved lint levels from Factorio.toml [lints] (and defaults).
Implementations§
Source§impl LintConfig
impl LintConfig
Sourcepub fn allow_all() -> Self
pub fn allow_all() -> Self
All lints allowed (useful in unit tests that exercise transparent methods).
Sourcepub fn with_overrides(
self,
overrides: &BTreeMap<String, LintLevel>,
) -> Result<Self, String>
pub fn with_overrides( self, overrides: &BTreeMap<String, LintLevel>, ) -> Result<Self, String>
pub fn level(&self, id: LintId) -> LintLevel
pub fn is_allowed(&self, id: LintId) -> bool
Trait Implementations§
Source§impl Clone for LintConfig
impl Clone for LintConfig
Source§fn clone(&self) -> LintConfig
fn clone(&self) -> LintConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 LintConfig
impl Debug for LintConfig
Source§impl Default for LintConfig
impl Default for LintConfig
impl Eq for LintConfig
Source§impl PartialEq for LintConfig
impl PartialEq for LintConfig
impl StructuralPartialEq for LintConfig
Auto Trait Implementations§
impl Freeze for LintConfig
impl RefUnwindSafe for LintConfig
impl Send for LintConfig
impl Sync for LintConfig
impl Unpin for LintConfig
impl UnsafeUnpin for LintConfig
impl UnwindSafe for LintConfig
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