Skip to main content

RuntimeDriver

Trait RuntimeDriver 

Source
pub trait RuntimeDriver: Send + Sync {
    // Required methods
    fn provider_id(&self) -> &ProviderId;
    fn capabilities<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = RuntimeResult<RuntimeCapabilities>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn apply<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        spec: &'life1 RuntimeUnitSpec,
        current: &'life2 RuntimeObservation,
    ) -> Pin<Box<dyn Future<Output = RuntimeResult<RuntimeObservation>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn inspect<'life0, 'life1, 'async_trait>(
        &'life0 self,
        unit: &'life1 RuntimeUnitRecord,
    ) -> Pin<Box<dyn Future<Output = RuntimeResult<RuntimeInspection>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn stop<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        unit: &'life1 RuntimeUnitRecord,
        request: &'life2 RuntimeActionRequest,
    ) -> Pin<Box<dyn Future<Output = RuntimeResult<RuntimeObservation>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn remove<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        unit: &'life1 RuntimeUnitRecord,
        request: &'life2 RuntimeActionRequest,
    ) -> Pin<Box<dyn Future<Output = RuntimeResult<RuntimeRemoval>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn logs<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        unit: &'life1 RuntimeUnitRecord,
        query: &'life2 RuntimeLogQuery,
    ) -> Pin<Box<dyn Future<Output = RuntimeResult<Vec<RuntimeLogChunk>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn exec<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        unit: &'life1 RuntimeUnitRecord,
        request: &'life2 RuntimeExecRequest,
    ) -> Pin<Box<dyn Future<Output = RuntimeResult<RuntimeExecResult>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

Provider-specific primitive used by ManagedRuntimeClient.

Drivers do not own request idempotency or durable shared state. apply, stop, and remove must nevertheless be safe to reattach after an ambiguous transport failure using the stable unit identity and generation. A successful apply must also retire every older provider generation for the unit before returning, leaving exactly one managed provider resource. If that handoff is interrupted, an exact retry must discover the partially created current generation and finish the same reconciliation.

Required Methods§

Source

fn provider_id(&self) -> &ProviderId

Source

fn capabilities<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = RuntimeResult<RuntimeCapabilities>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn apply<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, spec: &'life1 RuntimeUnitSpec, current: &'life2 RuntimeObservation, ) -> Pin<Box<dyn Future<Output = RuntimeResult<RuntimeObservation>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn inspect<'life0, 'life1, 'async_trait>( &'life0 self, unit: &'life1 RuntimeUnitRecord, ) -> Pin<Box<dyn Future<Output = RuntimeResult<RuntimeInspection>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn stop<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, unit: &'life1 RuntimeUnitRecord, request: &'life2 RuntimeActionRequest, ) -> Pin<Box<dyn Future<Output = RuntimeResult<RuntimeObservation>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn remove<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, unit: &'life1 RuntimeUnitRecord, request: &'life2 RuntimeActionRequest, ) -> Pin<Box<dyn Future<Output = RuntimeResult<RuntimeRemoval>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn logs<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, unit: &'life1 RuntimeUnitRecord, query: &'life2 RuntimeLogQuery, ) -> Pin<Box<dyn Future<Output = RuntimeResult<Vec<RuntimeLogChunk>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn exec<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, unit: &'life1 RuntimeUnitRecord, request: &'life2 RuntimeExecRequest, ) -> Pin<Box<dyn Future<Output = RuntimeResult<RuntimeExecResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Executes one durably identified request within its original budget.

ManagedRuntimeClient always supplies request.deadline_at_ms as the effective absolute deadline captured by the first reservation: the smaller of that attempt’s timeout_ms window and any caller-provided absolute deadline. A pending replay receives the same persisted value, so a driver must not restart or extend the execution window. Drivers may enforce a shorter provider-specific timeout and must deduplicate or reattach the stable request ID after an ambiguous result.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§