pub enum DataSource {
Buffer(Box<[u8]>),
Reader {
reader: Box<dyn Read>,
size: u64,
},
Skip(u64),
Fill(u32, u64),
Vmo {
vmo: Vmo,
size: u64,
offset: u64,
},
}Expand description
Input data for a SparseImageBuilder.
Variants§
Buffer(Box<[u8]>)
Heap allocated buffer.
Reader
Read size bytes from reader.
Skip(u64)
Skips this many bytes.
Fill(u32, u64)
Repeats the given u32, this many times.
Vmo
Read size bytes from vmo at offset.
Auto Trait Implementations§
impl Freeze for DataSource
impl !RefUnwindSafe for DataSource
impl !Send for DataSource
impl !Sync for DataSource
impl Unpin for DataSource
impl !UnwindSafe for DataSource
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