Struct libcoreinst::io::Initrd
source · 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 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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.