pub struct InitramfsBuilder { /* private fields */ }Implementations§
Source§impl InitramfsBuilder
impl InitramfsBuilder
pub fn new() -> Self
pub fn image(self, image: &str) -> Self
pub fn compression(self, compression: Compression) -> Self
pub fn exclude(self, patterns: &[&str]) -> Self
pub fn platform(self, os: &str, arch: &str) -> Self
Sourcepub fn auth(self, auth: RegistryAuth) -> Self
pub fn auth(self, auth: RegistryAuth) -> Self
Set authentication credentials
Sourcepub fn inject(self, src: impl Into<PathBuf>, dest: impl Into<PathBuf>) -> Self
pub fn inject(self, src: impl Into<PathBuf>, dest: impl Into<PathBuf>) -> Self
Inject a file into the initramfs
§Arguments
src- Source path on host filesystemdest- Destination path inside initramfs (e.g., “/usr/bin/myagent”)
Sourcepub fn inject_file(self, file: InjectFile) -> Self
pub fn inject_file(self, file: InjectFile) -> Self
Inject a file with custom options
Sourcepub fn init_script(self, path: impl Into<PathBuf>) -> Self
pub fn init_script(self, path: impl Into<PathBuf>) -> Self
Set a custom init script that will be placed at /init This script runs as PID 1 when the kernel boots
Trait Implementations§
Auto Trait Implementations§
impl Freeze for InitramfsBuilder
impl RefUnwindSafe for InitramfsBuilder
impl Send for InitramfsBuilder
impl Sync for InitramfsBuilder
impl Unpin for InitramfsBuilder
impl UnwindSafe for InitramfsBuilder
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