Skip to main content

Hop

Struct Hop 

Source
pub struct Hop {
Show 26 fields pub tier: Tier, pub ok: bool, pub code: String, pub status: u16, pub ms: u64, pub cost: f64, pub upto: f64, pub country: String, pub timeout_s: u64, pub kind: &'static str, pub body: Vec<u8>, pub headers: String, pub final_url: String, pub landed: Option<String>, pub refreshed_from: Option<String>, pub vis: usize, pub doc: Option<Doc>, pub tree: Option<Tree>, pub charset: &'static str, pub hits: Vec<Hit>, pub err: Vec<u8>, pub why: String, pub limit: Option<Limit>, pub end: Option<Instant>, pub lang: String, pub waited: u64,
}
Expand description

One call’s outcome: the hop row in meta.json, plus the body and doc for the store.

Fields§

§tier: Tier§ok: bool§code: String§status: u16§ms: u64§cost: f64§upto: f64

cache::HopRow::upto: a call we cut, its price unverified (billed).

§country: String

The request shape (cache::HopRow): the country sent (run, run_search), the timeout (drive).

§timeout_s: u64§kind: &'static str

clean::kind_of: html, pdf, zip, text, json, xml; empty = no body.

§body: Vec<u8>§headers: String

The answer’s status (HTTP 200) and its headers as Raw::headers keeps them (lower case), no credential (provider::header_lines): Meta::headers.

§final_url: String

Where the answer came from: the base of its links and pictures.

§landed: Option<String>

Where a bd ask landed by its same-site canonical link (canonical): Meta::landed, never a base.

§refreshed_from: Option<String>

The page whose meta refresh plain followed to this one (provider::refresh): Meta::refreshed_from.

§vis: usize

Visible characters (picks the best copy when every hop fails).

§doc: Option<Doc>§tree: Option<Tree>

A failed HTML answer’s parse, kept so the best failed copy is cleaned without a second parse.

§charset: &'static str§hits: Vec<Hit>

A search’s answer, best first.

§err: Vec<u8>

The provider’s own error answer, masked: kept as error.txt, never printed.

§why: String

Fail::why: the token the ! row adds to the code.

§limit: Option<Limit>

The provider’s request budget from this answer (provider::Limit): stored as two numbers in the hop.

§end: Option<Instant>

When the call landed (billed): a thin answer waits the hedge window from here (next).

§lang: String

The HTML answer’s <html lang> primary subtag, lower case (it); empty = none declared (langs).

§waited: u64

Ms plain waited for its turn before it started (provider::pace), not in ms.

Implementations§

Source§

impl Hop

Source

pub fn row(&self) -> HopRow

Trait Implementations§

Source§

impl Default for Hop

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Forget for Hop

§

impl Freeze for Hop

§

impl RefUnwindSafe for Hop

§

impl Send for Hop

§

impl Sync for Hop

§

impl Unpin for Hop

§

impl UnsafeUnpin for Hop

§

impl UnwindSafe for Hop

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<U, T> ToOwnedObj<U> for T
where U: FromObjRef<T>,

Source§

fn to_owned_obj(&self, data: FontData<'_>) -> U

Convert this type into T, using the provided data to resolve any offsets.
Source§

impl<U, T> ToOwnedTable<U> for T
where U: FromTableRef<T>,

Source§

fn to_owned_table(&self) -> U

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more