Skip to main content

Driver

Trait Driver 

Source
pub trait Driver: Send + Sync {
    // Required methods
    fn descriptor(&self) -> DriverDescriptor;
    fn inspect<'life0, 'life1, 'async_trait>(
        &'life0 self,
        probe: &'life1 InstanceProbe,
    ) -> Pin<Box<dyn Future<Output = Result<Option<InstalledDriver>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn resolve<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        request: &'life1 PrepareRequest<'life2>,
    ) -> Pin<Box<dyn Future<Output = Result<ResolvedDriverPlan>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;

    // Provided methods
    fn verify_prepared<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        _instance: &'life1 InstanceStorage,
        _prepared: &'life2 PreparedVersionJsonInstance,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait { ... }
    fn prepare<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        request: &'life1 PrepareRequest<'life2>,
    ) -> Pin<Box<dyn Future<Output = Result<PreparedVersionJsonInstance>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait { ... }
    fn load_prepared<'life0, 'life1, 'async_trait>(
        &'life0 self,
        instance: &'life1 InstanceStorage,
    ) -> Pin<Box<dyn Future<Output = Result<PreparedVersionJsonInstance>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
}

Required Methods§

Source

fn descriptor(&self) -> DriverDescriptor

Source

fn inspect<'life0, 'life1, 'async_trait>( &'life0 self, probe: &'life1 InstanceProbe, ) -> Pin<Box<dyn Future<Output = Result<Option<InstalledDriver>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn resolve<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, request: &'life1 PrepareRequest<'life2>, ) -> Pin<Box<dyn Future<Output = Result<ResolvedDriverPlan>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Resolves metadata and download sources needed to install or refresh an instance.

Provided Methods§

Source

fn verify_prepared<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _instance: &'life1 InstanceStorage, _prepared: &'life2 PreparedVersionJsonInstance, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Verifies family-specific persisted state when loading an existing instance.

Source

fn prepare<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, request: &'life1 PrepareRequest<'life2>, ) -> Pin<Box<dyn Future<Output = Result<PreparedVersionJsonInstance>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Prepare a version for launch and return the common version JSON view.

The result contains everything launch construction needs; family-specific installation state is not part of the public result.

Source

fn load_prepared<'life0, 'life1, 'async_trait>( &'life0 self, instance: &'life1 InstanceStorage, ) -> Pin<Box<dyn Future<Output = Result<PreparedVersionJsonInstance>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Load a prepared version and return the common version JSON view.

The result contains everything launch construction needs; family-specific installation state is not part of the public result.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§