Struct tinychain::fs::Dir [−][src]
pub struct Dir { /* fields omitted */ }
Expand description
A filesystem directory.
Implementations
Trait Implementations
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, C, F, B>(
&'life0 self,
txn_id: TxnId,
file_id: Id,
class: C
) -> Pin<Box<dyn Future<Output = TCResult<F>> + Send + 'async_trait>> where
C: Copy + Send + Display,
StateType: From<C>,
FileEntry: AsType<F>,
F: File<B>,
B: BlockData,
C: 'async_trait,
F: 'async_trait,
B: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
fn create_file<'life0, 'async_trait, C, F, B>(
&'life0 self,
txn_id: TxnId,
file_id: Id,
class: C
) -> Pin<Box<dyn Future<Output = TCResult<F>> + Send + 'async_trait>> where
C: Copy + Send + Display,
StateType: From<C>,
FileEntry: AsType<F>,
F: File<B>,
B: BlockData,
C: 'async_trait,
F: 'async_trait,
B: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
Create a new Self::File
.
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,
StateType: From<C>,
FileEntry: AsType<F>,
F: File<B>,
B: BlockData,
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,
StateType: From<C>,
FileEntry: AsType<F>,
F: File<B>,
B: BlockData,
C: 'async_trait,
F: 'async_trait,
B: '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, 'async_trait, F, B>(
&'life0 self,
txn_id: TxnId,
file_id: &'life1 Id
) -> Pin<Box<dyn Future<Output = TCResult<Option<F>>> + Send + 'async_trait>> where
FileEntry: AsType<F>,
F: File<B>,
B: BlockData,
F: 'async_trait,
B: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn get_file<'life0, 'life1, 'async_trait, F, B>(
&'life0 self,
txn_id: TxnId,
file_id: &'life1 Id
) -> Pin<Box<dyn Future<Output = TCResult<Option<F>>> + Send + 'async_trait>> where
FileEntry: AsType<F>,
F: File<B>,
B: BlockData,
F: 'async_trait,
B: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Get a Self::File
in this Dir
.
type View = (Schema, SeqStream<TCResult<(Bytes, MapStream<TxnId, TCResult<SeqStream<TCResult<MutationView<'en>>, TCBoxTryStream<'en, MutationView<'en>>>>, TCBoxStream<'en, (TxnId, TCResult<SeqStream<TCResult<MutationView<'en>>, TCBoxTryStream<'en, MutationView<'en>>>>)>>)>, TCBoxTryStream<'en, (Bytes, MapStream<TxnId, TCResult<SeqStream<TCResult<MutationView<'en>>, TCBoxTryStream<'en, MutationView<'en>>>>, TCBoxStream<'en, (TxnId, TCResult<SeqStream<TCResult<MutationView<'en>>, TCBoxTryStream<'en, MutationView<'en>>>>)>>)>>)
type View = InstanceView<'en>
Return a View
which can be encoded with en::IntoStream
.
type View = ObjectView<'en>
Return a View
which can be encoded with en::IntoStream
.
Commit this transaction.
Auto Trait Implementations
impl !RefUnwindSafe for Dir
impl !UnwindSafe for Dir
Blanket Implementations
Mutably borrows from an owned value. Read more
Returns true
if self
can be cast into the target type T
.
Test if value
can be cast into Self
.
Returns Some(Self)
if the source value can be cast into Self
, otherwise None
.
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
Returns Ok(Self)
if the source value can be cast into Self
, otherwise calls on_err
.
Test if self
can be cast into T
.
Returns Some(T)
if self
can be cast into T
, otherwise None
.
fn try_cast_into<Err, OnErr>(self, on_err: OnErr) -> Result<T, Err> where
OnErr: FnOnce(&Self) -> Err,
fn try_cast_into<Err, OnErr>(self, on_err: OnErr) -> Result<T, Err> where
OnErr: FnOnce(&Self) -> Err,
Returns Ok(T)
if self
can be cast into T
, otherwise calls on_err
.
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more