pub struct OtaDownloaderProxy { /* private fields */ }
Implementations§
Source§impl OtaDownloaderProxy
impl OtaDownloaderProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.pkg.internal/OtaDownloader.
Sourcepub fn take_event_stream(&self) -> OtaDownloaderEventStream
pub fn take_event_stream(&self) -> OtaDownloaderEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn fetch_blob(
&self,
hash: &BlobId,
base_url: &str,
) -> QueryResponseFut<OtaDownloaderFetchBlobResult, DefaultFuchsiaResourceDialect>
pub fn fetch_blob( &self, hash: &BlobId, base_url: &str, ) -> QueryResponseFut<OtaDownloaderFetchBlobResult, DefaultFuchsiaResourceDialect>
Fetches a blob from the given hash and base url.
On success, the blob will be written to the filesystem, but not sync’d, client should call
PackageCache.Sync
to guarantee blobs are persisted after all blobs are fetched.
- request
hash
the hash of the blob to fetch. - request
base_url
the base URL of the blob, the full URL of the blob will be constructed as “$base_url/$delivery_blob_type/$hash”.
- error indicates failure. See
fuchsia.pkg.ResolveError
for values and error scenarios.
Trait Implementations§
Source§impl Clone for OtaDownloaderProxy
impl Clone for OtaDownloaderProxy
Source§fn clone(&self) -> OtaDownloaderProxy
fn clone(&self) -> OtaDownloaderProxy
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 OtaDownloaderProxy
impl Debug for OtaDownloaderProxy
Source§impl OtaDownloaderProxyInterface for OtaDownloaderProxy
impl OtaDownloaderProxyInterface for OtaDownloaderProxy
type FetchBlobResponseFut = QueryResponseFut<Result<(), ResolveError>>
fn fetch_blob( &self, hash: &BlobId, base_url: &str, ) -> Self::FetchBlobResponseFut
Source§impl Proxy for OtaDownloaderProxy
impl Proxy for OtaDownloaderProxy
Source§type Protocol = OtaDownloaderMarker
type Protocol = OtaDownloaderMarker
The protocol which this
Proxy
controls.Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Create a proxy over the given channel.
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Attempt to convert the proxy back into a channel. Read more
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
Get a reference to the proxy’s underlying channel. Read more
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Attempt to convert the proxy back into a client end. Read more
Auto Trait Implementations§
impl Freeze for OtaDownloaderProxy
impl !RefUnwindSafe for OtaDownloaderProxy
impl Send for OtaDownloaderProxy
impl Sync for OtaDownloaderProxy
impl Unpin for OtaDownloaderProxy
impl !UnwindSafe for OtaDownloaderProxy
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,
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> FromClient for Twhere
T: Proxy,
impl<T> FromClient for Twhere
T: Proxy,
§fn from_client(value: ClientEnd<<T as FromClient>::Protocol>) -> T
fn from_client(value: ClientEnd<<T as FromClient>::Protocol>) -> T
Converts from a client.