Trait RegionCreate

Source
pub trait RegionCreate: Region {
    const TYPE_NAME: &'static str;

    // Required method
    fn create(
        instance_capacity: usize,
        limits: &Limits,
    ) -> Result<Arc<Self>, Error>;
}
Expand description

A trait for regions that are created with a fixed capacity and limits.

This is not part of Region so that Region types can be made into trait objects.

Required Associated Constants§

Source

const TYPE_NAME: &'static str

The type name of the region; useful for testing.

Required Methods§

Source

fn create(instance_capacity: usize, limits: &Limits) -> Result<Arc<Self>, Error>

Create a new Region that can support a given number instances, each subject to the same runtime limits.

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§

Source§

impl RegionCreate for MmapRegion

Source§

const TYPE_NAME: &'static str = "MmapRegion"