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: boolPID namespace enabled
ipc: boolIPC namespace enabled
net: boolNetwork namespace enabled
mount: boolMount namespace enabled
uts: boolUTS namespace enabled
user: boolUser namespace enabled
Implementations§
Source§impl NamespaceConfig
impl NamespaceConfig
Sourcepub fn to_clone_flags(&self) -> CloneFlags
pub fn to_clone_flags(&self) -> CloneFlags
Convert to clone flags
Sourcepub fn all_enabled(&self) -> bool
pub fn all_enabled(&self) -> bool
Check if all namespaces are enabled
Sourcepub fn enabled_count(&self) -> usize
pub fn enabled_count(&self) -> usize
Count enabled namespaces
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
Auto Trait Implementations§
impl Freeze for NamespaceConfig
impl RefUnwindSafe for NamespaceConfig
impl Send for NamespaceConfig
impl Sync for NamespaceConfig
impl Unpin 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