#[non_exhaustive]pub struct RequestEnv<'a> {
pub request: Arc<Request>,
pub crawler: CrawlerHandle,
pub events: &'a EventBus,
pub overrides: AttemptOverrides,
}Expand description
Per-attempt inputs supplied to CrawlerKind::execute.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.request: Arc<Request>The request being executed.
crawler: CrawlerHandleA weak back-reference to the running crawler.
events: &'a EventBusThe crawler’s event bus.
overrides: AttemptOverridesOverrides carried from the previous attempt of this request.
Implementations§
Source§impl<'a> RequestEnv<'a>
impl<'a> RequestEnv<'a>
Sourcepub fn duplicate(&self) -> RequestEnv<'a>
pub fn duplicate(&self) -> RequestEnv<'a>
Clones these per-attempt inputs so one attempt can try a second execution path (e.g. smart HTTP-first promotion re-executing through a browser kind). The struct is non-exhaustive, so only core can provide this.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for RequestEnv<'a>
impl<'a> !UnwindSafe for RequestEnv<'a>
impl<'a> Freeze for RequestEnv<'a>
impl<'a> Send for RequestEnv<'a>
impl<'a> Sync for RequestEnv<'a>
impl<'a> Unpin for RequestEnv<'a>
impl<'a> UnsafeUnpin for RequestEnv<'a>
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