pub struct FilePageSource { /* private fields */ }Expand description
File-backed page source. Reads from a memory-file on local disk by pread.
Implementations§
Source§impl FilePageSource
impl FilePageSource
Sourcepub fn open(path: &Path, ram_start: u64) -> Result<Self, PageSourceError>
pub fn open(path: &Path, ram_start: u64) -> Result<Self, PageSourceError>
Open the memory file and bind it to ram_start.
ram_start is the guest-physical address corresponding to byte 0 of the
memory file (typically DRAM_BASE = 0x8000_0000).
§Errors
PageSourceError::Open if the file cannot be opened.
Trait Implementations§
Source§impl Debug for FilePageSource
impl Debug for FilePageSource
Source§impl PageSource for FilePageSource
impl PageSource for FilePageSource
Source§fn fetch(&self, req: &PageRequest) -> Result<Bytes, PageSourceError>
fn fetch(&self, req: &PageRequest) -> Result<Bytes, PageSourceError>
Auto Trait Implementations§
impl Freeze for FilePageSource
impl RefUnwindSafe for FilePageSource
impl Send for FilePageSource
impl Sync for FilePageSource
impl Unpin for FilePageSource
impl UnsafeUnpin for FilePageSource
impl UnwindSafe for FilePageSource
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