pub struct SensitivePath {
pub path: String,
pub block_read: bool,
pub block_write: bool,
}Expand description
Sensitive path entry for blocking access to credential locations.
Fields§
§path: StringPath pattern (supports ~ for home directory)
block_read: boolWhether to block read access (true by default)
block_write: boolWhether to block write access (true by default)
Implementations§
Source§impl SensitivePath
impl SensitivePath
Sourcepub fn new(path: impl Into<String>) -> Self
pub fn new(path: impl Into<String>) -> Self
Create a new sensitive path entry that blocks both read and write.
Sourcepub fn write_only(path: impl Into<String>) -> Self
pub fn write_only(path: impl Into<String>) -> Self
Create a sensitive path entry that only blocks write access.
Sourcepub fn expand_path(&self) -> PathBuf
pub fn expand_path(&self) -> PathBuf
Expand ~ to the user’s home directory.
Trait Implementations§
Source§impl Clone for SensitivePath
impl Clone for SensitivePath
Source§fn clone(&self) -> SensitivePath
fn clone(&self) -> SensitivePath
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 SensitivePath
impl Debug for SensitivePath
Source§impl<'de> Deserialize<'de> for SensitivePath
impl<'de> Deserialize<'de> for SensitivePath
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 SensitivePath
Source§impl Hash for SensitivePath
impl Hash for SensitivePath
Source§impl PartialEq for SensitivePath
impl PartialEq for SensitivePath
Source§impl Serialize for SensitivePath
impl Serialize for SensitivePath
impl StructuralPartialEq for SensitivePath
Auto Trait Implementations§
impl Freeze for SensitivePath
impl RefUnwindSafe for SensitivePath
impl Send for SensitivePath
impl Sync for SensitivePath
impl Unpin for SensitivePath
impl UnsafeUnpin for SensitivePath
impl UnwindSafe for SensitivePath
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.