pub struct Consent { /* private fields */ }Expand description
The declined targets, and the file they are kept in.
Implementations§
Source§impl Consent
impl Consent
Sourcepub fn load(path: impl Into<PathBuf>) -> Result<Self>
pub fn load(path: impl Into<PathBuf>) -> Result<Self>
The store kept at path. A file that does not exist yet is an empty
store.
§Errors
Returns an error when the file exists but cannot be read.
Sourcepub fn is_declined(&self, target: &Path) -> bool
pub fn is_declined(&self, target: &Path) -> bool
Whether the user declined this target.
Sourcepub fn decline(&mut self, target: &Path) -> Result<()>
pub fn decline(&mut self, target: &Path) -> Result<()>
Record that the user declined this target.
§Errors
Returns an error for a path that cannot be stored on one line.
Trait Implementations§
impl Eq for Consent
impl StructuralPartialEq for Consent
Auto Trait Implementations§
impl Freeze for Consent
impl RefUnwindSafe for Consent
impl Send for Consent
impl Sync for Consent
impl Unpin for Consent
impl UnsafeUnpin for Consent
impl UnwindSafe for Consent
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