Skip to main content

RequestExt

Trait RequestExt 

Source
pub trait RequestExt {
    // Required methods
    fn tag(&self) -> Option<&Tag>;
    fn depth(&self) -> Depth;
    fn attempt(&self) -> Attempt;
}
Expand description

Reads crawl metadata from a Request.

The crawler stores the Tag, Depth and Attempt of every request in its extensions.

Required Methods§

Source

fn tag(&self) -> Option<&Tag>

Returns the tag, if the request has one.

Source

fn depth(&self) -> Depth

Returns the depth, defaulting to Depth::ROOT.

Source

fn attempt(&self) -> Attempt

Returns the attempt, defaulting to Attempt::FIRST.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§