ProvideShareableRegions

Trait ProvideShareableRegions 

Source
pub trait ProvideShareableRegions: Send + Sync {
    // Required method
    fn get_regions(
        &self,
    ) -> impl Future<Output = Result<Vec<ShareableRegion>, ShareableRegionError>> + Send + '_;
}
Expand description

Trait for providing shareable region information.

Implementors must return regions whose backing files have fully committed data — consumers will map them directly without guestmem-managed fault handling. The region set is currently static; dynamic updates (hotplug / hot-remove) are not yet supported.

This trait must be public so that crates like membacking can implement it, but callers should interact with GuestMemorySharing’s methods rather than this trait directly.

Required Methods§

Source

fn get_regions( &self, ) -> impl Future<Output = Result<Vec<ShareableRegion>, ShareableRegionError>> + Send + '_

Return the current set of shareable backing regions.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§