[−][src]Struct asuran::repository::backend::multifile::MultiFile
Methods
impl MultiFile
[src]
pub async fn open_defaults<'_>(
path: impl AsRef<Path>,
chunk_settings: Option<ChunkSettings>,
key: &'_ Key
) -> Result<MultiFile>
[src]
path: impl AsRef<Path>,
chunk_settings: Option<ChunkSettings>,
key: &'_ Key
) -> 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
pub fn read_key(path: impl AsRef<Path>) -> Result<EncryptedKey>
[src]
Reads the encrypted key off the disk
Does not require that the repository be opened first
Note: this path is the repository root path, not the key path
Errors
Will error if the key is corrupted or deserialization otherwise fails
Trait Implementations
impl Backend for MultiFile
[src]
type Manifest = Manifest
type Index = Index
fn get_index(&self) -> Self::Index
[src]
Clones the internal MFManifest
fn get_manifest(&self) -> Self::Manifest
[src]
Clones the internal MFIndex
fn write_key<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 EncryptedKey
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
key: &'life1 EncryptedKey
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Locks the keyfile and writes the key
Will return Err if writing the key fails
fn read_key<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<EncryptedKey>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<EncryptedKey>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
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,
[src]
&'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,
[src]
&'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
fn close<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
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
fn get_object_handle(&self) -> BackendObject
[src]
impl Clone for MultiFile
[src]
impl Debug for MultiFile
[src]
Auto Trait Implementations
impl !RefUnwindSafe for MultiFile
impl Send for MultiFile
impl Sync for MultiFile
impl Unpin for MultiFile
impl !UnwindSafe for MultiFile
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BackendClone for T where
T: Backend + Clone + ?Sized,
[src]
T: Backend + Clone + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
fn vzip(self) -> V
impl<T> WithSubscriber for T
[src]
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,