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.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Get
impl !RefUnwindSafe for Get
impl Send for Get
impl Sync for Get
impl Unpin for Get
impl !UnwindSafe for Get
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
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
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>
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>
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