pub struct Initrd { /* private fields */ }Implementations§
Source§impl Initrd
impl Initrd
Sourcepub fn from_reader<R: Read>(source: R) -> Result<Self>
pub fn from_reader<R: Read>(source: R) -> Result<Self>
Read an initrd containing compressed and/or uncompressed archives.
Sourcepub fn from_reader_filtered<R: Read>(
source: R,
filter: &GlobMatcher,
) -> Result<Self>
pub fn from_reader_filtered<R: Read>( source: R, filter: &GlobMatcher, ) -> Result<Self>
Read an initrd containing compressed and/or uncompressed archives, ignoring paths not matching the specified glob patterns.
pub fn get(&self, path: &str) -> Option<&[u8]>
pub fn find(&self, filter: &GlobMatcher) -> BTreeMap<&str, &[u8]>
pub fn add(&mut self, path: &str, contents: Vec<u8>)
pub fn remove(&mut self, path: &str)
pub fn is_empty(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Initrd
impl RefUnwindSafe for Initrd
impl Send for Initrd
impl Sync for Initrd
impl Unpin for Initrd
impl UnwindSafe for Initrd
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