pub struct Ignores { /* private fields */ }Implementations§
Source§impl Ignores
impl Ignores
Sourcepub fn load(base: &Path) -> Result<Self>
pub fn load(base: &Path) -> Result<Self>
Loads the ignore list from <base>/ignores.toml.
A missing file is treated as an empty list.
§Errors
Returns an error if the file exists but cannot be read or is not valid TOML in the expected format.
Sourcepub fn add(&mut self, key: &str) -> Result<()>
pub fn add(&mut self, key: &str) -> Result<()>
Adds key to the ignore list and immediately persists it to disk.
§Errors
Returns an error if the base directory cannot be created, if the path has no parent directory, or if writing the file fails.
pub fn contains(&self, key: &str) -> bool
Auto Trait Implementations§
impl Freeze for Ignores
impl RefUnwindSafe for Ignores
impl Send for Ignores
impl Sync for Ignores
impl Unpin for Ignores
impl UnsafeUnpin for Ignores
impl UnwindSafe for Ignores
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