pub trait SharedFileType: AsyncRead + AsyncWrite {
type Type;
type OpenError;
type SyncError;
// Required methods
fn open_ro<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Self::Type, Self::OpenError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn open_rw<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Self::Type, Self::OpenError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn sync_all<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Self::SyncError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn sync_data<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Self::SyncError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Trait for types used as a file storage backend.
Required Associated Types§
Required Methods§
Sourcefn open_ro<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Self::Type, Self::OpenError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn open_ro<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Self::Type, Self::OpenError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Opens a new Type
instance in read-only mode.
Sourcefn open_rw<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Self::Type, Self::OpenError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn open_rw<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Self::Type, Self::OpenError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Opens a new Type
instance in read-write mode.