Trait VolumeDriver

Source
pub trait VolumeDriver:
    Send
    + Sync
    + 'static {
    // Required methods
    fn create<'async_trait>(
        driver: State<Arc<Self>>,
        request: Json<CreateRequest>,
    ) -> Pin<Box<dyn Future<Output = VolumeResponse<Json<NullResponse>>> + Send + 'async_trait>>
       where Self: 'async_trait;
    fn remove<'async_trait>(
        driver: State<Arc<Self>>,
        request: Json<RemoveRequest>,
    ) -> Pin<Box<dyn Future<Output = VolumeResponse<Json<NullResponse>>> + Send + 'async_trait>>
       where Self: 'async_trait;
    fn mount<'async_trait>(
        driver: State<Arc<Self>>,
        request: Json<MountRequest>,
    ) -> Pin<Box<dyn Future<Output = VolumeResponse<Json<MountResponse>>> + Send + 'async_trait>>
       where Self: 'async_trait;
    fn unmount<'async_trait>(
        driver: State<Arc<Self>>,
        request: Json<UnmountRequest>,
    ) -> Pin<Box<dyn Future<Output = VolumeResponse<Json<NullResponse>>> + Send + 'async_trait>>
       where Self: 'async_trait;
    fn path<'async_trait>(
        driver: State<Arc<Self>>,
        request: Json<PathRequest>,
    ) -> Pin<Box<dyn Future<Output = VolumeResponse<Json<PathResponse>>> + Send + 'async_trait>>
       where Self: 'async_trait;
    fn get<'async_trait>(
        driver: State<Arc<Self>>,
        request: Json<GetRequest>,
    ) -> Pin<Box<dyn Future<Output = VolumeResponse<Json<GetResponse>>> + Send + 'async_trait>>
       where Self: 'async_trait;
    fn list<'async_trait>(
        driver: State<Arc<Self>>,
    ) -> Pin<Box<dyn Future<Output = VolumeResponse<Json<ListResponse>>> + Send + 'async_trait>>
       where Self: 'async_trait;
    fn capabilities<'async_trait>(
        driver: State<Arc<Self>>,
    ) -> Pin<Box<dyn Future<Output = VolumeResponse<Json<CapabilitiesResponse>>> + Send + 'async_trait>>
       where Self: 'async_trait;

    // Provided method
    fn activate<'async_trait>(    ) -> Pin<Box<dyn Future<Output = Json<Value>> + Send + 'async_trait>> { ... }
}

Required Methods§

Source

fn create<'async_trait>( driver: State<Arc<Self>>, request: Json<CreateRequest>, ) -> Pin<Box<dyn Future<Output = VolumeResponse<Json<NullResponse>>> + Send + 'async_trait>>
where Self: 'async_trait,

Source

fn remove<'async_trait>( driver: State<Arc<Self>>, request: Json<RemoveRequest>, ) -> Pin<Box<dyn Future<Output = VolumeResponse<Json<NullResponse>>> + Send + 'async_trait>>
where Self: 'async_trait,

Source

fn mount<'async_trait>( driver: State<Arc<Self>>, request: Json<MountRequest>, ) -> Pin<Box<dyn Future<Output = VolumeResponse<Json<MountResponse>>> + Send + 'async_trait>>
where Self: 'async_trait,

Source

fn unmount<'async_trait>( driver: State<Arc<Self>>, request: Json<UnmountRequest>, ) -> Pin<Box<dyn Future<Output = VolumeResponse<Json<NullResponse>>> + Send + 'async_trait>>
where Self: 'async_trait,

Source

fn path<'async_trait>( driver: State<Arc<Self>>, request: Json<PathRequest>, ) -> Pin<Box<dyn Future<Output = VolumeResponse<Json<PathResponse>>> + Send + 'async_trait>>
where Self: 'async_trait,

Source

fn get<'async_trait>( driver: State<Arc<Self>>, request: Json<GetRequest>, ) -> Pin<Box<dyn Future<Output = VolumeResponse<Json<GetResponse>>> + Send + 'async_trait>>
where Self: 'async_trait,

Source

fn list<'async_trait>( driver: State<Arc<Self>>, ) -> Pin<Box<dyn Future<Output = VolumeResponse<Json<ListResponse>>> + Send + 'async_trait>>
where Self: 'async_trait,

Source

fn capabilities<'async_trait>( driver: State<Arc<Self>>, ) -> Pin<Box<dyn Future<Output = VolumeResponse<Json<CapabilitiesResponse>>> + Send + 'async_trait>>
where Self: 'async_trait,

Provided Methods§

Source

fn activate<'async_trait>() -> Pin<Box<dyn Future<Output = Json<Value>> + 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§