pub struct CorePathPolicyBuilder { /* private fields */ }Implementations§
Source§impl CorePathPolicyBuilder
impl CorePathPolicyBuilder
Sourcepub fn allow_dir(self, dir: impl AsRef<Path>) -> Self
pub fn allow_dir(self, dir: impl AsRef<Path>) -> Self
Allow filesystem operations under dir. The directory is
canonicalized at build() time; passing a path that doesn’t
exist or that the process can’t resolve causes build() to
return Err(Error::Sandbox(...)).
Sourcepub fn deny_glob(self, pat: impl Into<String>) -> Self
pub fn deny_glob(self, pat: impl Into<String>) -> Self
Deny any path matching this glob even if it falls under an allowed dir.
pub fn build(self) -> Result<CorePathPolicy, Error>
Trait Implementations§
Source§impl Debug for CorePathPolicyBuilder
impl Debug for CorePathPolicyBuilder
Source§impl Default for CorePathPolicyBuilder
impl Default for CorePathPolicyBuilder
Source§fn default() -> CorePathPolicyBuilder
fn default() -> CorePathPolicyBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CorePathPolicyBuilder
impl RefUnwindSafe for CorePathPolicyBuilder
impl Send for CorePathPolicyBuilder
impl Sync for CorePathPolicyBuilder
impl Unpin for CorePathPolicyBuilder
impl UnsafeUnpin for CorePathPolicyBuilder
impl UnwindSafe for CorePathPolicyBuilder
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