Skip to main content

UseGenerationLeaseProvider

Trait UseGenerationLeaseProvider 

Source
pub trait UseGenerationLeaseProvider:
    Send
    + Sync
    + 'static {
    // Required methods
    fn use_generation(&self) -> &UseCapabilityGeneration;
    fn acquire<'life0, 'async_trait>(
        &'life0 self,
        cancellation: CancellationToken,
    ) -> Pin<Box<dyn Future<Output = Result<Box<dyn RetainedUseGeneration>, UseGenerationLeaseError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Generation-bound host seam for the real non-clone A3S Use snapshot lease.

A provider is published in the same catalog CAS as its projection. Each Run calls Self::acquire again so A3S Use can reject a generation that has become hidden or stale since Code installed the projection. Implementations must retain the concrete a3s_use::CapabilitySnapshotLease inside the returned RetainedUseGeneration value.

Required Methods§

Source

fn use_generation(&self) -> &UseCapabilityGeneration

Source

fn acquire<'life0, 'async_trait>( &'life0 self, cancellation: CancellationToken, ) -> Pin<Box<dyn Future<Output = Result<Box<dyn RetainedUseGeneration>, UseGenerationLeaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§