pub struct LoaderSynchronousProxy { /* private fields */ }
Implementations§
Source§impl LoaderSynchronousProxy
impl LoaderSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<LoaderEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<LoaderEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn fetch(
&self,
request: Request,
___deadline: MonotonicInstant,
) -> Result<Response, Error>
pub fn fetch( &self, request: Request, ___deadline: MonotonicInstant, ) -> Result<Response, Error>
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, either close the loader interface or close the peer to the
event
included in the request
.
Sourcepub fn start(
&self,
request: Request,
client: ClientEnd<LoaderClientMarker>,
) -> Result<(), Error>
pub fn start( &self, request: Request, client: ClientEnd<LoaderClientMarker>, ) -> Result<(), Error>
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
.
Trait Implementations§
Source§impl Debug for LoaderSynchronousProxy
impl Debug for LoaderSynchronousProxy
Source§impl SynchronousProxy for LoaderSynchronousProxy
impl SynchronousProxy for LoaderSynchronousProxy
Source§type Proxy = LoaderProxy
type Proxy = LoaderProxy
The async proxy for the same protocol.
Source§type Protocol = LoaderMarker
type Protocol = LoaderMarker
The protocol which this
Proxy
controls.Source§fn from_channel(inner: Channel) -> Self
fn from_channel(inner: Channel) -> Self
Create a proxy over the given channel.
Source§fn into_channel(self) -> Channel
fn into_channel(self) -> Channel
Convert the proxy back into a channel.
Source§fn as_channel(&self) -> &Channel
fn as_channel(&self) -> &Channel
Get a reference to the proxy’s underlying channel. Read more
Auto Trait Implementations§
impl Freeze for LoaderSynchronousProxy
impl RefUnwindSafe for LoaderSynchronousProxy
impl Send for LoaderSynchronousProxy
impl Sync for LoaderSynchronousProxy
impl Unpin for LoaderSynchronousProxy
impl UnwindSafe for LoaderSynchronousProxy
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