pub struct BundleHandler<K: BundleKind>(/* private fields */);Expand description
A bundle repository handler, parameterised by which bundle kind it serves.
Implementations§
Source§impl<K: BundleKind> BundleHandler<K>
impl<K: BundleKind> BundleHandler<K>
Trait Implementations§
Source§impl<K: BundleKind> Clone for BundleHandler<K>
impl<K: BundleKind> Clone for BundleHandler<K>
Source§impl<K: BundleKind> Default for BundleHandler<K>
impl<K: BundleKind> Default for BundleHandler<K>
Source§impl<K: BundleKind> PackageHandler for BundleHandler<K>
impl<K: BundleKind> PackageHandler for BundleHandler<K>
Source§fn manifest(&self) -> WireManifest
fn manifest(&self) -> WireManifest
Identity, reported to the host at load.
Source§fn fetch(
&self,
store: &dyn BlobStore,
id: &WireArtifactId,
) -> Result<Option<Vec<u8>>, String>
fn fetch( &self, store: &dyn BlobStore, id: &WireArtifactId, ) -> Result<Option<Vec<u8>>, String>
Fetch one coordinate’s bytes.
Source§fn put(
&self,
store: &dyn BlobStore,
id: &WireArtifactId,
data: &[u8],
) -> Result<(), String>
fn put( &self, store: &dyn BlobStore, id: &WireArtifactId, data: &[u8], ) -> Result<(), String>
Store one coordinate’s bytes.
Source§fn list(
&self,
store: &dyn BlobStore,
name_filter: Option<&str>,
limit: usize,
) -> Result<Vec<WireArtifactEntry>, String>
fn list( &self, store: &dyn BlobStore, name_filter: Option<&str>, limit: usize, ) -> Result<Vec<WireArtifactEntry>, String>
Enumerate held artifacts, filtered by a substring of the name.
Source§fn coordinate_for_path(&self, suburl: &str) -> Option<WireArtifactId>
fn coordinate_for_path(&self, suburl: &str) -> Option<WireArtifactId>
Map a raw HTTP suburl back to a coordinate — the inverse of the path this
handler serves from. Pure: it must not touch the store, because the
serve-time quarantine gate calls it on every request.
Source§fn http(
&self,
store: &dyn BlobStore,
req: &WireHttpRequest,
) -> Result<WireHttpResponse, String>
fn http( &self, store: &dyn BlobStore, req: &WireHttpRequest, ) -> Result<WireHttpResponse, String>
Answer one HTTP request against this handler’s own path scheme.
Auto Trait Implementations§
impl<K> Freeze for BundleHandler<K>where
PhantomData<K>: Freeze,
impl<K> RefUnwindSafe for BundleHandler<K>where
PhantomData<K>: RefUnwindSafe,
impl<K> Send for BundleHandler<K>where
PhantomData<K>: Send,
impl<K> Sync for BundleHandler<K>where
PhantomData<K>: Sync,
impl<K> Unpin for BundleHandler<K>where
PhantomData<K>: Unpin,
impl<K> UnsafeUnpin for BundleHandler<K>where
PhantomData<K>: UnsafeUnpin,
impl<K> UnwindSafe for BundleHandler<K>where
PhantomData<K>: UnwindSafe,
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