Trait tc_transact::fs::Dir [−][src]
pub trait Dir: Store + Sized + 'static { type File: Send; type FileClass; #[must_use] 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; #[must_use] 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; #[must_use] 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; #[must_use] 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; #[must_use] 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; #[must_use] 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; #[must_use] 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
type File: Send
[src]
Expand description
The type of a file entry in this Dir
type FileClass
[src]
Expand description
The Class
of a file stored in this Dir
Required methods
#[must_use]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,
[src]
#[must_use]
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,
Expand description
Return true
if this directory has an entry at the given PathSegment
.
#[must_use]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,
[src]
#[must_use]
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,
Expand description
Create a new Dir
.
#[must_use]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,
[src]
#[must_use]
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,
Expand description
Create a new Dir
with a new unique ID.
#[must_use]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,
[src]
#[must_use]
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,
Expand description
Create a new Self::File
.
#[must_use]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,
[src]
#[must_use]
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,
Expand description
Create a new Self::File
with a new unique ID.
#[must_use]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,
[src]
#[must_use]
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,
Expand description
Look up a subdirectory of this Dir
.
#[must_use]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,
[src]
#[must_use]
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
Get a Self::File
in this Dir
.