Skip to main content

LfsRows

Trait LfsRows 

Source
pub trait LfsRows: Send + Sync {
    // Required methods
    fn assert<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        repo_id: &'life1 str,
        oid: &'life2 str,
        size: u64,
    ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + 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,
        repo_id: &'life1 str,
        oid: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn remove_repo<'life0, 'life1, 'async_trait>(
        &'life0 self,
        repo_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn rows<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<LfsRow>, StorageError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn repo_rows<'life0, 'life1, 'async_trait>(
        &'life0 self,
        repo_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<LfsRow>, StorageError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

The LFS pointer-lifecycle row surface (substrate.md §public API’s “the LFS liveness/pointer-lifecycle surface under lfs” — the row-op half; the exact names this module pins are the OQ-03 substrate-side inventory of the wave-9 rows task). Three impls in the refs-tables’ pattern: InMemoryLfsRows (the reference impl, engine-free), the sqlite twin (SqliteLfsRows, the sqlite feature), and the postgres twin ([PgLfsRows], the postgres + lfs features).

Required Methods§

Source

fn assert<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, repo_id: &'life1 str, oid: &'life2 str, size: u64, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Assert a reference: insert the (repo_id, oid) row with the asserted size, or — when the pair already has a row — refresh that row’s size and change nothing else (the refcount-aware upsert: one oid re-asserted in one repo is one row).

Source

fn remove<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, repo_id: &'life1 str, oid: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Remove one reference row. An absent row is a success no-op; the oid’s surviving rows recompute their refcount.

Source

fn remove_repo<'life0, 'life1, 'async_trait>( &'life0 self, repo_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

The repo-deletion leg: the repo’s rows go with the repo (its oids’ surviving rows in other repos recompute their refcount).

Source

fn rows<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<LfsRow>, StorageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

The liveness read — all rows, canonical (repo_id, oid) order.

Source

fn repo_rows<'life0, 'life1, 'async_trait>( &'life0 self, repo_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<LfsRow>, StorageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

The liveness read — one repo’s rows, canonical oid order.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§