Trait tc_transact::fs::Dir [−][src]
pub trait Dir: Store + Send + Sized + 'static { type File: Send; type FileClass: Send; fn contains<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
txn_id: &'life1 TxnId,
name: &'life2 PathSegment
) -> Pin<Box<dyn Future<Output = TCResult<bool>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: '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_tmp<'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, F: TryFrom<Self::File, Error = TCError>, C: Send>(
&'life0 self,
txn_id: TxnId,
name: Id,
class: C
) -> Pin<Box<dyn Future<Output = TCResult<F>> + Send + 'async_trait>>
where
Self::FileClass: From<C>,
F: 'async_trait,
C: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait; fn create_file_tmp<'life0, 'async_trait, F: TryFrom<Self::File, Error = TCError>, C: Send>(
&'life0 self,
txn_id: TxnId,
class: C
) -> Pin<Box<dyn Future<Output = TCResult<F>> + Send + 'async_trait>>
where
Self::FileClass: From<C>,
F: 'async_trait,
C: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait; fn get_dir<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
txn_id: &'life1 TxnId,
name: &'life2 PathSegment
) -> Pin<Box<dyn Future<Output = TCResult<Option<Self>>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait; fn get_file<'life0, 'life1, 'life2, 'async_trait, F: TryFrom<Self::File, Error = TCError>>(
&'life0 self,
txn_id: &'life1 TxnId,
name: &'life2 Id
) -> Pin<Box<dyn Future<Output = TCResult<Option<F>>> + Send + 'async_trait>>
where
F: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait; }
Expand description
A transactional directory
Associated Types
Required methods
Return true
if this directory has an entry at the given PathSegment
.
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<'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,
Create a new Dir
.
Create a new Dir
with a new unique ID.
fn create_file<'life0, 'async_trait, F: TryFrom<Self::File, Error = TCError>, C: Send>(
&'life0 self,
txn_id: TxnId,
name: Id,
class: C
) -> Pin<Box<dyn Future<Output = TCResult<F>> + Send + 'async_trait>> where
Self::FileClass: From<C>,
F: 'async_trait,
C: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
fn create_file<'life0, 'async_trait, F: TryFrom<Self::File, Error = TCError>, C: Send>(
&'life0 self,
txn_id: TxnId,
name: Id,
class: C
) -> Pin<Box<dyn Future<Output = TCResult<F>> + Send + 'async_trait>> where
Self::FileClass: From<C>,
F: 'async_trait,
C: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
Create a new Self::File
.
fn create_file_tmp<'life0, 'async_trait, F: TryFrom<Self::File, Error = TCError>, C: Send>(
&'life0 self,
txn_id: TxnId,
class: C
) -> Pin<Box<dyn Future<Output = TCResult<F>> + Send + 'async_trait>> where
Self::FileClass: From<C>,
F: 'async_trait,
C: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
fn create_file_tmp<'life0, 'async_trait, F: TryFrom<Self::File, Error = TCError>, C: Send>(
&'life0 self,
txn_id: TxnId,
class: C
) -> Pin<Box<dyn Future<Output = TCResult<F>> + Send + 'async_trait>> where
Self::FileClass: From<C>,
F: 'async_trait,
C: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
Create a new Self::File
with a new unique ID.
Look up a subdirectory of this Dir
.
fn get_file<'life0, 'life1, 'life2, 'async_trait, F: TryFrom<Self::File, Error = TCError>>(
&'life0 self,
txn_id: &'life1 TxnId,
name: &'life2 Id
) -> Pin<Box<dyn Future<Output = TCResult<Option<F>>> + Send + 'async_trait>> where
F: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn get_file<'life0, 'life1, 'life2, 'async_trait, F: TryFrom<Self::File, Error = TCError>>(
&'life0 self,
txn_id: &'life1 TxnId,
name: &'life2 Id
) -> Pin<Box<dyn Future<Output = TCResult<Option<F>>> + Send + 'async_trait>> where
F: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Get a Self::File
in this Dir
.