Trait tc_transact::fs::Dir

source ·
pub trait Dir: Store + Clone + Send + Sized + 'static {
    type Read: DirRead<Lock = Self>;
    type Write: DirCreate<Lock = Self>;
    type Store: Store;
    type Inner;

    fn read<'life0, 'async_trait>(
        &'life0 self,
        txn_id: TxnId
    ) -> Pin<Box<dyn Future<Output = TCResult<Self::Read>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait
; fn try_read(&self, txn_id: TxnId) -> TCResult<Self::Read>; fn write<'life0, 'async_trait>(
        &'life0 self,
        txn_id: TxnId
    ) -> Pin<Box<dyn Future<Output = TCResult<Self::Write>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait
; fn try_write(&self, txn_id: TxnId) -> TCResult<Self::Write>; fn into_inner(self) -> Self::Inner; fn create_dir_unique<'life0, 'async_trait>(
        &'life0 self,
        txn_id: TxnId
    ) -> Pin<Box<dyn Future<Output = TCResult<Self>> + Send + 'async_trait>>
    where
        Self: Sync + 'async_trait,
        'life0: 'async_trait
, { ... } fn create_file_unique<'life0, 'async_trait, F>(
        &'life0 self,
        txn_id: TxnId
    ) -> Pin<Box<dyn Future<Output = TCResult<F>> + Send + 'async_trait>>
    where
        F: File<Inner = Self::Inner> + 'async_trait,
        Self::Write: DirCreateFile<F>,
        Self: Sync + 'async_trait,
        'life0: 'async_trait
, { ... } }
Expand description

A transactional directory

Required Associated Types§

The type of read guard used by this Dir

The type of write guard used by this Dir

A type which can be resolved to either a directory or a file within this Dir

The underlying filesystem directory type

Required Methods§

Lock this Dir for reading.

Lock this Dir for reading synchronously, if possible.

Lock this Dir for writing.

Lock this Dir for writing synchronously, if possible.

Provided Methods§

Convenience method to create a temporary working directory

Convenience method to create a temporary file

Implementors§