pub struct SandboxPolicy { /* private fields */ }Expand description
Validated portable sandbox policy, independent of any OS launcher.
Implementations§
Source§impl SandboxPolicy
impl SandboxPolicy
Sourcepub fn new(
requirements: impl IntoIterator<Item = (SandboxControl, SandboxRequirement)>,
mounts: Vec<SandboxMount>,
limits: SandboxLimits,
) -> Result<Self>
pub fn new( requirements: impl IntoIterator<Item = (SandboxControl, SandboxRequirement)>, mounts: Vec<SandboxMount>, limits: SandboxLimits, ) -> Result<Self>
Validates a complete control classification, mount set, and limit set.
Sourcepub fn requirements(&self) -> &BTreeMap<SandboxControl, SandboxRequirement>
pub fn requirements(&self) -> &BTreeMap<SandboxControl, SandboxRequirement>
Returns the complete requested-control map.
Sourcepub fn mounts(&self) -> &[SandboxMount]
pub fn mounts(&self) -> &[SandboxMount]
Returns declared mounts only.
Sourcepub fn limits(&self) -> &SandboxLimits
pub fn limits(&self) -> &SandboxLimits
Returns the validated resource limits.
Trait Implementations§
Source§impl Clone for SandboxPolicy
impl Clone for SandboxPolicy
Source§fn clone(&self) -> SandboxPolicy
fn clone(&self) -> SandboxPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SandboxPolicy
impl Debug for SandboxPolicy
impl Eq for SandboxPolicy
Source§impl PartialEq for SandboxPolicy
impl PartialEq for SandboxPolicy
impl StructuralPartialEq for SandboxPolicy
Auto Trait Implementations§
impl Freeze for SandboxPolicy
impl RefUnwindSafe for SandboxPolicy
impl Send for SandboxPolicy
impl Sync for SandboxPolicy
impl Unpin for SandboxPolicy
impl UnsafeUnpin for SandboxPolicy
impl UnwindSafe for SandboxPolicy
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