pub struct ReadDenyMatcher { /* private fields */ }Expand description
Runtime matcher for read-deny entries in a filesystem sandbox policy.
Implementations§
Source§impl ReadDenyMatcher
impl ReadDenyMatcher
Sourcepub fn try_new(
file_system_sandbox_policy: &FileSystemSandboxPolicy,
cwd: &Path,
) -> Result<Option<Self>, String>
pub fn try_new( file_system_sandbox_policy: &FileSystemSandboxPolicy, cwd: &Path, ) -> Result<Option<Self>, String>
Fallible constructor for callers that need to reject malformed deny glob patterns before using the matcher.
Sourcepub fn new(
file_system_sandbox_policy: &FileSystemSandboxPolicy,
cwd: &Path,
) -> Option<Self>
pub fn new( file_system_sandbox_policy: &FileSystemSandboxPolicy, cwd: &Path, ) -> Option<Self>
Builds a matcher from exact deny-read roots and deny-read glob entries.
Returns None when the policy has no deny-read restrictions, so callers
can skip read-deny checks without allocating matcher state. The cwd
resolves cwd-relative policy paths and special paths before matching.
Sourcepub fn is_read_denied(&self, path: &Path) -> bool
pub fn is_read_denied(&self, path: &Path) -> bool
Returns whether path is denied by the policy used to build this matcher.
Auto Trait Implementations§
impl Freeze for ReadDenyMatcher
impl RefUnwindSafe for ReadDenyMatcher
impl Send for ReadDenyMatcher
impl Sync for ReadDenyMatcher
impl Unpin for ReadDenyMatcher
impl UnsafeUnpin for ReadDenyMatcher
impl UnwindSafe for ReadDenyMatcher
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