pub struct Sandbox {
pub denied: Caps,
/* private fields */
}Fields§
§denied: CapsImplementations§
Source§impl Sandbox
impl Sandbox
pub fn allow_all() -> Self
pub fn deny(caps: Caps) -> Self
pub fn with_allowed_paths(self, paths: Vec<PathBuf>) -> Self
pub fn is_unrestricted(&self) -> bool
pub fn check(&self, required: Caps, fn_name: &str) -> Result<(), SemaError>
pub fn check_path(&self, path: &str, fn_name: &str) -> Result<(), SemaError>
pub fn parse_allowed_paths(value: &str) -> Vec<PathBuf>
pub fn parse_cli(value: &str) -> Result<Self, String>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Sandbox
impl RefUnwindSafe for Sandbox
impl Send for Sandbox
impl Sync for Sandbox
impl Unpin for Sandbox
impl UnsafeUnpin for Sandbox
impl UnwindSafe for Sandbox
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