pub struct UserNamespaceConfig {
pub newuidmap: Option<PathBuf>,
pub newgidmap: Option<PathBuf>,
pub user_namespace: Option<LinuxNamespace>,
pub privileged: bool,
pub id_mapper: UserNamespaceIDMapper,
/* private fields */
}Fields§
§newuidmap: Option<PathBuf>Location of the newuidmap binary
newgidmap: Option<PathBuf>Location of the newgidmap binary
user_namespace: Option<LinuxNamespace>Info on the user namespaces
privileged: boolIs the container requested by a privileged user
id_mapper: UserNamespaceIDMapperPath to the id mappings
Implementations§
Source§impl UserNamespaceConfig
impl UserNamespaceConfig
pub fn new(spec: &Spec) -> Result<Option<Self>, UserNamespaceError>
pub fn write_uid_mapping( &self, target_pid: Pid, ) -> Result<(), UserNamespaceError>
pub fn write_gid_mapping( &self, target_pid: Pid, ) -> Result<(), UserNamespaceError>
pub fn with_id_mapper(&mut self, mapper: UserNamespaceIDMapper)
Trait Implementations§
Source§impl Clone for UserNamespaceConfig
impl Clone for UserNamespaceConfig
Source§fn clone(&self) -> UserNamespaceConfig
fn clone(&self) -> UserNamespaceConfig
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 UserNamespaceConfig
impl Debug for UserNamespaceConfig
Source§impl Default for UserNamespaceConfig
impl Default for UserNamespaceConfig
Source§fn default() -> UserNamespaceConfig
fn default() -> UserNamespaceConfig
Returns the “default value” for a type. Read more
Source§impl TryFrom<&Linux> for UserNamespaceConfig
impl TryFrom<&Linux> for UserNamespaceConfig
Source§type Error = UserNamespaceError
type Error = UserNamespaceError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for UserNamespaceConfig
impl RefUnwindSafe for UserNamespaceConfig
impl Send for UserNamespaceConfig
impl Sync for UserNamespaceConfig
impl Unpin for UserNamespaceConfig
impl UnsafeUnpin for UserNamespaceConfig
impl UnwindSafe for UserNamespaceConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more