Struct openvet_storage::handler::StorageHandler
source · pub struct StorageHandler { /* private fields */ }Implementations§
source§impl StorageHandler
impl StorageHandler
pub fn new(service: StorageService) -> Self
Trait Implementations§
source§impl Clone for StorageHandler
impl Clone for StorageHandler
source§fn clone(&self) -> StorageHandler
fn clone(&self) -> StorageHandler
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for StorageHandler
impl Debug for StorageHandler
source§impl Storage for StorageHandler
impl Storage for StorageHandler
source§async fn ping(self, _: Context, message: String) -> String
async fn ping(self, _: Context, message: String) -> String
Ping message, should respond with the same message.
source§async fn crate_list(self, _: Context) -> BTreeSet<CrateName>
async fn crate_list(self, _: Context) -> BTreeSet<CrateName>
Get list of crates
source§async fn crate_info(self, _: Context, krate: CrateName) -> Option<CrateInfo>
async fn crate_info(self, _: Context, krate: CrateName) -> Option<CrateInfo>
Get full crate info
source§async fn crate_write(self, _: Context, info: CrateInfo)
async fn crate_write(self, _: Context, info: CrateInfo)
Create a crate, if it does not exist.
source§async fn object_get(self, _: Context, hash: Checksum) -> Option<Bytes>
async fn object_get(self, _: Context, hash: Checksum) -> Option<Bytes>
Get an object
source§async fn object_exists(self, _: Context, hash: Checksum) -> bool
async fn object_exists(self, _: Context, hash: Checksum) -> bool
Check if an object exists
source§async fn object_write(self, _: Context, bytes: Bytes) -> Checksum
async fn object_write(self, _: Context, bytes: Bytes) -> Checksum
Write an object
source§async fn sources_missing(
self,
_: Context,
limit: usize,
) -> BTreeSet<CrateVersion>
async fn sources_missing( self, _: Context, limit: usize, ) -> BTreeSet<CrateVersion>
List all crate-versions which are missing sources
async fn crate_tree_write(self, _: Context, krate: CrateVersion, root: Node)
§fn serve(self) -> ServeStorage<Self>
fn serve(self) -> ServeStorage<Self>
Returns a serving function to use with
InFlightRequest::execute.
Auto Trait Implementations§
impl Freeze for StorageHandler
impl !RefUnwindSafe for StorageHandler
impl Send for StorageHandler
impl Sync for StorageHandler
impl Unpin for StorageHandler
impl !UnwindSafe for StorageHandler
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more