pub struct InMemoryRegistryMeta { /* private fields */ }Expand description
In-memory RegistryMeta impl for tests and single-node deployments.
Implementations§
Source§impl InMemoryRegistryMeta
impl InMemoryRegistryMeta
Wrap in an Arc<dyn RegistryMeta> for crate::router::AppState.
Trait Implementations§
Source§impl Default for InMemoryRegistryMeta
impl Default for InMemoryRegistryMeta
Source§fn default() -> InMemoryRegistryMeta
fn default() -> InMemoryRegistryMeta
Returns the “default value” for a type. Read more
Source§impl RegistryMeta for InMemoryRegistryMeta
impl RegistryMeta for InMemoryRegistryMeta
Source§fn put_manifest<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
name: &'life1 str,
reference: &'life2 Reference,
digest: &'life3 Digest,
media_type: &'life4 str,
body: Bytes,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn put_manifest<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
name: &'life1 str,
reference: &'life2 Reference,
digest: &'life3 Digest,
media_type: &'life4 str,
body: Bytes,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Persist a manifest body under (name, reference). Read more
Source§fn get_manifest<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
reference: &'life2 Reference,
) -> Pin<Box<dyn Future<Output = Result<Option<(Digest, String, Bytes)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_manifest<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
reference: &'life2 Reference,
) -> Pin<Box<dyn Future<Output = Result<Option<(Digest, String, Bytes)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Fetch a manifest by (name, reference). Read more
Source§fn delete_manifest<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
reference: &'life2 Reference,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn delete_manifest<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
reference: &'life2 Reference,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Delete a manifest by (name, reference). Read more
List tags for
name, honouring n / last pagination.Source§fn list_repositories<'life0, 'life1, 'async_trait>(
&'life0 self,
last: Option<&'life1 str>,
n: Option<usize>,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_repositories<'life0, 'life1, 'async_trait>(
&'life0 self,
last: Option<&'life1 str>,
n: Option<usize>,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
List repositories (catalog endpoint).
Source§fn start_upload<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn start_upload<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Allocate a new upload UUID for
name.Source§fn append_upload<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
uuid: &'life2 str,
offset: u64,
chunk: Bytes,
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn append_upload<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
uuid: &'life2 str,
offset: u64,
chunk: Bytes,
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Append
chunk to the upload and return the new byte offset.Source§fn complete_upload<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
name: &'life1 str,
uuid: &'life2 str,
_digest: &'life3 Digest,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn complete_upload<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
name: &'life1 str,
uuid: &'life2 str,
_digest: &'life3 Digest,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Mark the upload as complete and return the buffered bytes.
Source§fn get_upload_state<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
uuid: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<UploadState>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_upload_state<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
uuid: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<UploadState>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Retrieve the current upload state (without consuming it).
Source§fn cancel_upload<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
uuid: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn cancel_upload<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
uuid: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Cancel and discard an in-flight upload. Returns
true when the
upload existed.Source§fn list_referrers<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
name: &'life1 str,
digest: &'life2 Digest,
artifact_type: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<Vec<ReferrerDescriptor>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn list_referrers<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
name: &'life1 str,
digest: &'life2 Digest,
artifact_type: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<Vec<ReferrerDescriptor>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
List referrers for
digest in name, filtered by artifact type.Source§fn take_upload_bytes<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
uuid: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Bytes>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn take_upload_bytes<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
uuid: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Bytes>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Take the accumulated upload buffer. The handler needs this on
finalize to hand the bytes to the blob store.
Source§fn register_referrer<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
subject: &'life2 Digest,
descriptor: ReferrerDescriptor,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn register_referrer<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
subject: &'life2 Digest,
descriptor: ReferrerDescriptor,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Register a referrer descriptor against a subject digest. Read more
Auto Trait Implementations§
impl !Freeze for InMemoryRegistryMeta
impl !RefUnwindSafe for InMemoryRegistryMeta
impl Send for InMemoryRegistryMeta
impl Sync for InMemoryRegistryMeta
impl Unpin for InMemoryRegistryMeta
impl UnsafeUnpin for InMemoryRegistryMeta
impl UnwindSafe for InMemoryRegistryMeta
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