pub struct SensitivePath { /* private fields */ }Expand description
Compiled sensitive-path matcher. Supports simple glob syntax:
/etc/** – any path under /etc
~/.ssh/** – any path under the user’s .ssh directory
/etc/passwd – exactly /etc/passwd (case sensitive on POSIX)
/var/lib/*/data – single-segment wildcard
Paths in the input are normalised before matching:
- leading
~expanded to the user’s home directory ..segments resolved- trailing
/normalised away
This means /etc/../etc/passwd and /etc/passwd evaluate the same,
closing a class of evasion tricks.
Implementations§
Trait Implementations§
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