pub struct UserSpec { /* private fields */ }Expand description
The identity the packaged application is expected to run as.
The fields are private because the name is rendered verbatim into
/etc/passwd and /etc/group, which are colon- and newline-delimited. A
value that reached those files unchecked could declare a second account —
including a uid-0 one with a shell — in an image whose whole point is that
it contains nothing unaudited. Construct one with UserSpec::parse or
UserSpec::new, both of which enforce that invariant.
Implementations§
Source§impl UserSpec
impl UserSpec
pub fn uid(&self) -> u32
pub fn gid(&self) -> u32
pub fn name(&self) -> &str
pub fn group(&self) -> &str
Trait Implementations§
impl Eq for UserSpec
impl StructuralPartialEq for UserSpec
Auto Trait Implementations§
impl Freeze for UserSpec
impl RefUnwindSafe for UserSpec
impl Send for UserSpec
impl Sync for UserSpec
impl Unpin for UserSpec
impl UnsafeUnpin for UserSpec
impl UnwindSafe for UserSpec
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.