pub trait Dir: Store + Send + Sized + 'static {
    type File: Send;
    type FileClass: Send;

    fn contains<'life0, 'life1, 'async_trait>(
        &'life0 self,
        txn_id: TxnId,
        name: &'life1 PathSegment
    ) -> Pin<Box<dyn Future<Output = TCResult<bool>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; fn create_dir<'life0, 'async_trait>(
        &'life0 self,
        txn_id: TxnId,
        name: PathSegment
    ) -> Pin<Box<dyn Future<Output = TCResult<Self>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; fn create_dir_unique<'life0, 'async_trait>(
        &'life0 self,
        txn_id: TxnId
    ) -> Pin<Box<dyn Future<Output = TCResult<Self>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; fn create_file<'life0, 'async_trait, C, F, B>(
        &'life0 self,
        txn_id: TxnId,
        name: Id,
        class: C
    ) -> Pin<Box<dyn Future<Output = TCResult<F>> + Send + 'async_trait>>
    where
        C: Copy + Send + Display,
        F: Clone,
        B: BlockData,
        Self::FileClass: From<C>,
        Self::File: AsType<F>,
        F: File<B>,
        C: 'async_trait,
        F: 'async_trait,
        B: 'async_trait,
        'life0: 'async_trait,
        Self: 'async_trait
; fn create_file_unique<'life0, 'async_trait, C, F, B>(
        &'life0 self,
        txn_id: TxnId,
        class: C
    ) -> Pin<Box<dyn Future<Output = TCResult<F>> + Send + 'async_trait>>
    where
        C: Copy + Send + Display,
        F: Clone,
        B: BlockData,
        Self::FileClass: From<C>,
        Self::File: AsType<F>,
        F: File<B>,
        C: 'async_trait,
        F: 'async_trait,
        B: 'async_trait,
        'life0: 'async_trait,
        Self: 'async_trait
; fn get_dir<'life0, 'life1, 'async_trait>(
        &'life0 self,
        txn_id: TxnId,
        name: &'life1 PathSegment
    ) -> Pin<Box<dyn Future<Output = TCResult<Option<Self>>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; fn get_file<'life0, 'life1, 'async_trait, F, B>(
        &'life0 self,
        txn_id: TxnId,
        name: &'life1 Id
    ) -> Pin<Box<dyn Future<Output = TCResult<Option<F>>> + Send + 'async_trait>>
    where
        F: Clone,
        B: BlockData,
        Self::File: AsType<F>,
        F: File<B>,
        F: 'async_trait,
        B: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; }
Expand description

A transactional directory

Required Associated Types

The type of a file entry in this Dir

The Class of a file stored in this Dir

Required Methods

Return true if this directory has an entry at the given PathSegment.

Create a new Dir.

Create a new Dir with a new unique ID.

Create a new Self::File.

Create a new Self::File with a new unique ID.

Look up a subdirectory of this Dir.

Get a Self::File in this Dir.

Implementors