Skip to main content

PageSource

Trait PageSource 

Source
pub trait PageSource:
    Send
    + Sync
    + Debug {
    // Required method
    fn fetch(&self, req: &PageRequest) -> Result<Bytes, PageSourceError>;
}
Expand description

Where the pager pulls page bytes from.

One concrete impl per mem_backend.backend_type (File, Uffd).

Required Methods§

Source

fn fetch(&self, req: &PageRequest) -> Result<Bytes, PageSourceError>

Return the bytes for req.ipa rounded down to its req.page_size boundary.

§Errors

PageSourceError for any source-side failure.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§