pub enum LoaderRequest {
Fetch {
request: Request,
responder: LoaderFetchResponder,
},
Start {
request: Request,
client: ClientEnd<LoaderClientMarker>,
control_handle: LoaderControlHandle,
},
}Expand description
An HTTP and HTTPS loader.
The loader can service many HTTP or HTTPS requests concurrently. The loader tracks all the outstanding requests and will cancel them all if the client closes the loader interface.
Variants§
Fetch
Initiate the given HTTP or HTTPS request, follow redirects, and return the final response.
The loader will follow redirects (up to an implementation-defined limit) and return the final response as a reply to this message. To cancel the request, close the loader interface.
Start
Initiate the given HTTP or HTTPS request and return all intermediate responses to the given client.
Unlike Fetch, Start does not automatically follow all redirects.
Instead, each individual response along the redirect chain is delivered
to the LoaderClient.
Implementations§
Source§impl LoaderRequest
impl LoaderRequest
pub fn into_fetch(self) -> Option<(Request, LoaderFetchResponder)>
pub fn into_start( self, ) -> Option<(Request, ClientEnd<LoaderClientMarker>, LoaderControlHandle)>
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 !RefUnwindSafe for LoaderRequest
impl !UnwindSafe for LoaderRequest
impl Freeze for LoaderRequest
impl Send for LoaderRequest
impl Sync for LoaderRequest
impl Unpin for LoaderRequest
impl UnsafeUnpin for LoaderRequest
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,
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
T to [Self]