pub struct NamespaceConfig {
pub pid: bool,
pub ipc: bool,
pub net: bool,
pub mount: bool,
pub uts: bool,
pub user: bool,
}Expand description
Configuration for namespace isolation
Fields§
§pid: bool§ipc: bool§net: bool§mount: bool§uts: bool§user: boolImplementations§
Source§impl NamespaceConfig
impl NamespaceConfig
Sourcepub fn all() -> NamespaceConfig
pub fn all() -> NamespaceConfig
All namespaces enabled
Sourcepub fn minimal() -> NamespaceConfig
pub fn minimal() -> NamespaceConfig
Minimal configuration (PID, IPC, NET, MOUNT)
Sourcepub fn unprivileged() -> NamespaceConfig
pub fn unprivileged() -> NamespaceConfig
Unprivileged mode: user namespace enabled to allow other namespaces without root
Sourcepub fn privileged() -> NamespaceConfig
pub fn privileged() -> NamespaceConfig
Privileged mode: no user namespace needed (running as root)
Sourcepub fn to_clone_flags(&self) -> CloneFlags
pub fn to_clone_flags(&self) -> CloneFlags
Convert to clone flags
pub fn all_enabled(&self) -> bool
pub fn enabled_count(&self) -> usize
Trait Implementations§
Source§impl Clone for NamespaceConfig
impl Clone for NamespaceConfig
Source§fn clone(&self) -> NamespaceConfig
fn clone(&self) -> NamespaceConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 NamespaceConfig
impl Debug for NamespaceConfig
Source§impl Default for NamespaceConfig
impl Default for NamespaceConfig
Source§fn default() -> NamespaceConfig
fn default() -> NamespaceConfig
Returns the “default value” for a type. Read more
Source§impl PartialEq for NamespaceConfig
impl PartialEq for NamespaceConfig
impl StructuralPartialEq for NamespaceConfig
Auto Trait Implementations§
impl Freeze for NamespaceConfig
impl RefUnwindSafe for NamespaceConfig
impl Send for NamespaceConfig
impl Sync for NamespaceConfig
impl Unpin for NamespaceConfig
impl UnsafeUnpin for NamespaceConfig
impl UnwindSafe for NamespaceConfig
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