pub struct ImageUser<'a> {
pub user: &'a str,
pub passwd: &'a str,
pub group: &'a str,
}Expand description
Account data from the same image whose OCI USER is being resolved.
Fields§
§user: &'a strOCI config.User, empty when absent.
passwd: &'a strImage’s /etc/passwd, empty when absent.
group: &'a strImage’s /etc/group, empty when absent.
Implementations§
Source§impl ImageUser<'_>
impl ImageUser<'_>
Sourcepub fn exec_identity(
&self,
default_uid: u32,
command_uid: Option<u32>,
) -> Result<ExecIdentity>
pub fn exec_identity( &self, default_uid: u32, command_uid: Option<u32>, ) -> Result<ExecIdentity>
Preserve a non-root image USER. Root/absent USER uses the backend default, or an explicitly declared command uid. A declaration must agree with a non-root image user. Unknown names and invalid ids fail before an image is built or a session starts.
Sourcepub fn image_identity(&self) -> Result<ExecIdentity>
pub fn image_identity(&self) -> Result<ExecIdentity>
Resolve OCI USER for the image boot process, including root and an absent USER. Numeric users without passwd entries use group zero, as Docker does.
Auto Trait Implementations§
impl<'a> Forget for ImageUser<'a>
impl<'a> Freeze for ImageUser<'a>
impl<'a> RefUnwindSafe for ImageUser<'a>
impl<'a> Send for ImageUser<'a>
impl<'a> Sync for ImageUser<'a>
impl<'a> Unpin for ImageUser<'a>
impl<'a> UnsafeUnpin for ImageUser<'a>
impl<'a> UnwindSafe for ImageUser<'a>
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