Struct asuran::repository::backend::common::sync_backend::BackendHandle[][src]

pub struct BackendHandle<B: SyncBackend> { /* fields omitted */ }
Expand description

Wrapper Type for sync backends that converts them into async backends

Functions by moving the provided back end into a dedicated tokio task, and then sending SyncCommands to instruct that task on what to do.

Implementations

Constructs a new BackendHandle

Spawns a new runner thread to handle commands on.

Takes a closure that produces the required SyncBackend, in order to allow injecting non-Send backends into the spawned threads.

queue_depth should be a positive (greater than 0) integer, that represents the number of requests to hold in the processing queue at any given time.

Trait Implementations

Returns a view of the index of the repository

Writes the specified encrypted key to the backend Read more

Attempts to read the encrypted key from the backend.

Returns a view of this respository’s manifest

Starts reading a chunk from the backend Read more

Starts writing a chunk to the backend Read more

Consumes the current backend handle, and does any work necessary to close out the backend properly Read more

Creates a new trait-object based BackendHandle Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Provides the location of a chunk in the repository

Sets the location of a chunk in the repository

Returns the set of all ChunkIDs known to exist in the Asuran repository.

Commits the index

Returns the total number of chunks in the index

Timestamp of the last modification

Returns the default settings for new chunks in this repository

Returns an iterator over the list of archives in this repository, in reverse chronological order (newest first). Read more

Sets the chunk settings in the repository

Adds an archive to the manifest

Updates the timestamp without performing any other operations

Provides a list of versions of asuran that have committed to this manifest, in (SemVer, ImplementationUUID) Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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