pub struct SubrequestSpawner { /* private fields */ }Expand description
A handle to the underlying HTTP proxy app that allows spawning subrequests.
Implementations§
Source§impl SubrequestSpawner
impl SubrequestSpawner
Sourcepub fn new(app: Arc<dyn Subrequest + Send + Sync>) -> SubrequestSpawner
pub fn new(app: Arc<dyn Subrequest + Send + Sync>) -> SubrequestSpawner
Create a new SubrequestSpawner.
Sourcepub fn spawn_background_subrequest(
&self,
session: &HttpSession,
ctx: SubrequestCtx,
) -> JoinHandle<()>
pub fn spawn_background_subrequest( &self, session: &HttpSession, ctx: SubrequestCtx, ) -> JoinHandle<()>
Spawn a background subrequest and return a join handle.
Sourcepub fn create_subrequest(
&self,
session: &HttpSession,
ctx: SubrequestCtx,
) -> (PreparedSubrequest, SubrequestHandle)
pub fn create_subrequest( &self, session: &HttpSession, ctx: SubrequestCtx, ) -> (PreparedSubrequest, SubrequestHandle)
Create a subrequest that listens to HttpTasks sent from the returned Sender
and sends HttpTasks to the returned Receiver.
To run that subrequest, call run().
Auto Trait Implementations§
impl Freeze for SubrequestSpawner
impl !RefUnwindSafe for SubrequestSpawner
impl Send for SubrequestSpawner
impl Sync for SubrequestSpawner
impl Unpin for SubrequestSpawner
impl UnsafeUnpin for SubrequestSpawner
impl !UnwindSafe for SubrequestSpawner
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