[][src]Struct asuran::repository::backend::flatfile::FlatFile

pub struct FlatFile { /* fields omitted */ }

Methods

impl FlatFile[src]

pub fn new_raw(
    repository_path: impl AsRef<Path>,
    settings: Option<ChunkSettings>,
    enc_key: Option<EncryptedKey>
) -> Result<FlatFile>
[src]

Internal function for opening a flat file repository

The backend this creates is not thread safe, see FlatFile for the thread safe implementation on top of this.

Optionally sets the chunk settings.

Errors

Will return Err if:

  1. The file doesn't exist and creation failed
  2. The file doesn't exist and chunk settings were not provided

pub fn new(
    repository_path: impl AsRef<Path>,
    settings: Option<ChunkSettings>,
    enc_key: Option<EncryptedKey>
) -> Result<BackendHandle<FlatFile>>
[src]

Constructs a flatfile and wraps it

pub fn load_encrypted_key(
    repository_path: impl AsRef<Path>
) -> Result<EncryptedKey>
[src]

Attempts to read the key from the flatfile repo at a given path

Trait Implementations

impl Debug for FlatFile[src]

impl SyncBackend for FlatFile[src]

type SyncManifest = Self

type SyncIndex = Self

impl SyncIndex for FlatFile[src]

impl SyncManifest for FlatFile[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]