fuse

Trait Mapper

Source
pub trait Mapper {
    // Required methods
    fn map(
        &self,
        offset: u64,
        file: FileRef<'_>,
        file_offset: u64,
        len: u64,
        writable: bool,
    ) -> Result<()>;
    fn unmap(&self, offset: u64, len: u64) -> Result<()>;
    fn clear(&self);
}
Expand description

Trait for mapping files into a shared memory region.

This is used to support DAX with virtio-fs.

Required Methods§

Source

fn map( &self, offset: u64, file: FileRef<'_>, file_offset: u64, len: u64, writable: bool, ) -> Result<()>

Map memory into the region at offset.

Source

fn unmap(&self, offset: u64, len: u64) -> Result<()>

Unmaps any memory in the given range.

Source

fn clear(&self)

Clears any mappings in the range.

Implementors§