pub struct PathContext {
pub allowed_prefixes: &'static [&'static str],
pub require_exists: bool,
pub require_file: bool,
}Expand description
Context for path validation.
Controls which checks are applied. Default enables all checks
with built-in prefixes (/tmp, /var/tmp, /home), extended by
RUNTIMO_ALLOWED_PATHS env var and config file if set.
Fields§
§allowed_prefixes: &'static [&'static str]Additional allowed directory prefixes (merged with defaults + env var + config).
require_exists: boolIf true, the path must already exist on disk.
require_file: boolIf true, the path must be a regular file (not a directory).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PathContext
impl RefUnwindSafe for PathContext
impl Send for PathContext
impl Sync for PathContext
impl Unpin for PathContext
impl UnsafeUnpin for PathContext
impl UnwindSafe for PathContext
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