Trait GenericDevicePlugin

Source
pub trait GenericDevicePlugin:
    'static
    + Sync
    + Send
    + Default {
    const PRE_START_REQUIRED: bool;
    const GET_PREFERRED_ALLOCATION_AVAILABLE: bool;
    const RESOURCE_NAME: &'static str;
    const DEVICE_POLL_INTERVAL: Duration;

    // Required methods
    fn get_devices<'async_trait>(    ) -> Pin<Box<dyn Future<Output = Result<Vec<Device>, Status>> + Send + 'async_trait>>;
    fn container_allocate<'async_trait>(
        device_ids: Vec<String>,
    ) -> Pin<Box<dyn Future<Output = Result<ContainerAllocateResponse, Status>> + Send + 'async_trait>>;
    fn get_container_preferred_allocation<'async_trait>(
        available_device_ids: Vec<String>,
        must_include_device_ids: Vec<String>,
        allocation_size: i32,
    ) -> Pin<Box<dyn Future<Output = Result<ContainerPreferredAllocationResponse, Status>> + Send + 'async_trait>>;
    fn pre_start_container<'async_trait>(
        device_ids: Vec<String>,
    ) -> Pin<Box<dyn Future<Output = Result<(), Status>> + Send + 'async_trait>>;
}

Required Associated Constants§

Required Methods§

Source

fn get_devices<'async_trait>() -> Pin<Box<dyn Future<Output = Result<Vec<Device>, Status>> + Send + 'async_trait>>

Source

fn container_allocate<'async_trait>( device_ids: Vec<String>, ) -> Pin<Box<dyn Future<Output = Result<ContainerAllocateResponse, Status>> + Send + 'async_trait>>

Source

fn get_container_preferred_allocation<'async_trait>( available_device_ids: Vec<String>, must_include_device_ids: Vec<String>, allocation_size: i32, ) -> Pin<Box<dyn Future<Output = Result<ContainerPreferredAllocationResponse, Status>> + Send + 'async_trait>>

Source

fn pre_start_container<'async_trait>( device_ids: Vec<String>, ) -> Pin<Box<dyn Future<Output = Result<(), Status>> + Send + 'async_trait>>

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§