pub struct Restrictions { /* private fields */ }Expand description
A narrow, additive-only ratchet consumed by tighten.
It can express only the primitives that are safe to stack onto an already-applied sandbox: additional syscall denials and a further-restricted path. The one-shot, authority-consuming primitives — namespaces, credentials, and mounts — are absent from this type, so a non-monotonic ratchet is unrepresentable.
Implementations§
Source§impl Restrictions
impl Restrictions
Sourcepub fn none() -> RestrictionsBuilder
pub fn none() -> RestrictionsBuilder
Start from “no additional restriction”; every method on the returned builder can only narrow further.
Trait Implementations§
Source§impl Clone for Restrictions
impl Clone for Restrictions
Source§fn clone(&self) -> Restrictions
fn clone(&self) -> Restrictions
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 moreAuto Trait Implementations§
impl Freeze for Restrictions
impl RefUnwindSafe for Restrictions
impl Send for Restrictions
impl Sync for Restrictions
impl Unpin for Restrictions
impl UnsafeUnpin for Restrictions
impl UnwindSafe for Restrictions
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