Struct asuran::repository::backend::multifile::MultiFile [−][src]
pub struct MultiFile { /* fields omitted */ }
Implementations
pub async fn open_defaults(
path: impl AsRef<Path>,
chunk_settings: Option<ChunkSettings>,
key: &Key,
queue_depth: usize
) -> Result<MultiFile>
pub async fn open_defaults(
path: impl AsRef<Path>,
chunk_settings: Option<ChunkSettings>,
key: &Key,
queue_depth: usize
) -> Result<MultiFile>
Opens a new MultiFile
backend with default settings
Subject to change in the near future
Errors
Will error if creating or locking any of the index or manifest files fails (such as if the user does not have permissions for that directory), or if any other I/O error occurs
Trait Implementations
Clones the internal MFIndex
Locks the keyfile and writes the key
Will return Err if writing the key fails
Attempts to read the key from the repository
Returns Err if the key doesn’t exist or of another error occurs
fn read_chunk<'life0, 'async_trait>(
&'life0 mut self,
location: SegmentDescriptor
) -> Pin<Box<dyn Future<Output = Result<Chunk>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn read_chunk<'life0, 'async_trait>(
&'life0 mut self,
location: SegmentDescriptor
) -> Pin<Box<dyn Future<Output = Result<Chunk>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Starts reading a chunk, and returns a oneshot recieve with the result of that process
fn write_chunk<'life0, 'async_trait>(
&'life0 mut self,
chunk: Chunk
) -> Pin<Box<dyn Future<Output = Result<SegmentDescriptor>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn write_chunk<'life0, 'async_trait>(
&'life0 mut self,
chunk: Chunk
) -> Pin<Box<dyn Future<Output = Result<SegmentDescriptor>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Starts writing a chunk, and returns a oneshot reciever with the result of that process
Closes out the index, segment handler, and manifest cleanly, making sure all operations are completed and all drop impls from inside the tasks are called
Creates a new trait-object based BackendHandle Read more
Auto Trait Implementations
impl !RefUnwindSafe for MultiFile
impl !UnwindSafe for MultiFile
Blanket Implementations
Mutably borrows from an owned value. Read more
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