pub struct Get { /* private fields */ }
Expand description
A pending fuchsia.pkg/PackageCache.Get()
request. Clients must, in order:
- open/write the meta blob, if Some(NeededBlob) is provided by that API
- enumerate all missing content blobs
- open/write all missing content blobs, if Some(NeededBlob) is provided by that API
- finish() to complete the Get() request.
Implementations§
Source§impl Get
impl Get
Sourcepub fn make_open_meta_blob(&mut self) -> DeferredOpenBlob
pub fn make_open_meta_blob(&mut self) -> DeferredOpenBlob
Returns an independent object that can be used to open the meta blob for write. See
Self::open_meta_blob
.
Sourcepub async fn open_meta_blob(
&mut self,
) -> Result<Option<NeededBlob>, OpenBlobError>
pub async fn open_meta_blob( &mut self, ) -> Result<Option<NeededBlob>, OpenBlobError>
Opens the meta blob for write, if it is still needed. The blob’s data can be provided using the returned NeededBlob.
Sourcepub fn get_missing_blobs(
&mut self,
) -> impl Stream<Item = Result<Vec<BlobInfo>, ListMissingBlobsError>> + Unpin
pub fn get_missing_blobs( &mut self, ) -> impl Stream<Item = Result<Vec<BlobInfo>, ListMissingBlobsError>> + Unpin
Determines the set of blobs that the caller must open/write to complete this Get()
operation.
The returned stream will never yield an empty Vec
.
Callers should process the missing blobs (via make_open_blob
or open_blob
) concurrently
with reading the stream to guarantee stream termination.
Sourcepub fn make_open_blob(&mut self, content_blob: BlobId) -> DeferredOpenBlob
pub fn make_open_blob(&mut self, content_blob: BlobId) -> DeferredOpenBlob
Returns an independent object that can be used to open the content_blob
for write. See
Self::open_blob
.
Sourcepub async fn open_blob(
&mut self,
content_blob: BlobId,
) -> Result<Option<NeededBlob>, OpenBlobError>
pub async fn open_blob( &mut self, content_blob: BlobId, ) -> Result<Option<NeededBlob>, OpenBlobError>
Opens content_blob
for write, if it is still needed. The blob’s data can be provided
using the returned NeededBlob.