pub struct PathAllowlistGuard { /* private fields */ }Expand description
Guard that restricts filesystem access to explicitly allowed paths.
When enabled, any file access, write, or patch to a path not matching the corresponding allowlist is denied. When disabled, the guard returns Allow for all requests.
Implementations§
Source§impl PathAllowlistGuard
impl PathAllowlistGuard
pub fn new() -> Self
pub fn with_config(config: PathAllowlistConfig) -> Self
pub fn is_file_access_allowed(&self, path: &str) -> bool
pub fn is_file_write_allowed(&self, path: &str) -> bool
pub fn is_patch_allowed(&self, path: &str) -> bool
Trait Implementations§
Source§impl Default for PathAllowlistGuard
impl Default for PathAllowlistGuard
Auto Trait Implementations§
impl Freeze for PathAllowlistGuard
impl RefUnwindSafe for PathAllowlistGuard
impl Send for PathAllowlistGuard
impl Sync for PathAllowlistGuard
impl Unpin for PathAllowlistGuard
impl UnsafeUnpin for PathAllowlistGuard
impl UnwindSafe for PathAllowlistGuard
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