pub struct ClientProxy { /* private fields */ }Implementations§
Source§impl ClientProxy
impl ClientProxy
Sourcepub fn take_event_stream(&self) -> ClientEventStream
pub fn take_event_stream(&self) -> ClientEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn download_blob(
&self,
url: &str,
destination: ClientEnd<BlobWriterMarker>,
header_timeout: i64,
body_timeout: i64,
resumption_attempt_limit: u32,
) -> QueryResponseFut<ClientDownloadBlobResult, DefaultFuchsiaResourceDialect>
pub fn download_blob( &self, url: &str, destination: ClientEnd<BlobWriterMarker>, header_timeout: i64, body_timeout: i64, resumption_attempt_limit: u32, ) -> QueryResponseFut<ClientDownloadBlobResult, DefaultFuchsiaResourceDialect>
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.
Trait Implementations§
Source§impl ClientProxyInterface for ClientProxy
impl ClientProxyInterface for ClientProxy
type DownloadBlobResponseFut = QueryResponseFut<Result<u64, ClientDownloadBlobError>>
fn download_blob( &self, url: &str, destination: ClientEnd<BlobWriterMarker>, header_timeout: i64, body_timeout: i64, resumption_attempt_limit: u32, ) -> Self::DownloadBlobResponseFut
Source§impl Clone for ClientProxy
impl Clone for ClientProxy
Source§fn clone(&self) -> ClientProxy
fn clone(&self) -> ClientProxy
Returns a duplicate 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 ClientProxy
impl Debug for ClientProxy
Source§impl Proxy for ClientProxy
impl Proxy for ClientProxy
Source§type Protocol = ClientMarker
type Protocol = ClientMarker
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
Source§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
Source§fn on_closed(&self) -> OnSignals<'_, Unowned<'_, NullableHandle>>
fn on_closed(&self) -> OnSignals<'_, Unowned<'_, NullableHandle>>
Returns a future that completes when the proxy receives the
PEER_CLOSED signal.Auto Trait Implementations§
impl Freeze for ClientProxy
impl !RefUnwindSafe for ClientProxy
impl Send for ClientProxy
impl Sync for ClientProxy
impl Unpin for ClientProxy
impl UnsafeUnpin for ClientProxy
impl !UnwindSafe for ClientProxy
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,
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> FromClient for Twhere
T: Proxy,
impl<T> FromClient for Twhere
T: Proxy,
§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ProxyHasDomain for Twhere
T: Proxy,
impl<T> ProxyHasDomain for Twhere
T: Proxy,
Source§fn domain(&self) -> ZirconClient
fn domain(&self) -> ZirconClient
Get a “client” for this proxy. This is just an object which has methods
for a few common handle creation operations.