pub enum ClientRequest {
DownloadBlob {
url: String,
destination: ClientEnd<BlobWriterMarker>,
header_timeout: i64,
body_timeout: i64,
resumption_attempt_limit: u32,
responder: ClientDownloadBlobResponder,
},
}Expand description
An HTTP client for package resolution and OTAs.
Variants§
DownloadBlob
Makes an HTTP GET request for url and writes the response body to destination.
As long as forward progress is being made (response stream contains some body bytes before
terminating early), this method will repeatedly (up to resumption_attempt_limit) make
follow-up HTTP GET requests with the RANGE header set to the outstanding content.
- request
urlthe URL of the file to be downloaded. - request
destinationwhere the file will be written. - request
header_timeoutthe timeout to use when waiting for the entire HTTP response header to be downloaded. - request
body_timeoutthe timeout to use when waiting for every chunk of bytes while downloading the HTTP response body. - request
resumption_attempt_limitthe number of resumption attempts to make.
- response
sizethe size in bytes of the downloaded file.
Implementations§
Source§impl ClientRequest
impl ClientRequest
pub fn into_download_blob( self, ) -> Option<(String, ClientEnd<BlobWriterMarker>, i64, i64, u32, ClientDownloadBlobResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ClientRequest
impl !RefUnwindSafe for ClientRequest
impl Send for ClientRequest
impl Sync for ClientRequest
impl Unpin for ClientRequest
impl UnsafeUnpin for ClientRequest
impl !UnwindSafe for ClientRequest
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