#[non_exhaustive]pub enum RequestMode {
Http,
Smart,
Browser,
}Expand description
How the page is fetched.
The three values are the whole of the choice. Which software performs a rendered fetch is decided by the service and is not selectable here.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Http
Plain HTTP fetch. Cheapest and fastest, and wrong for pages that build their content after load.
Smart
Start with HTTP and switch to a rendered fetch when the first response looks like it needs one. The default, and the right answer when you do not know the page.
Browser
Always render the page before reading it. Costs more per page and takes longer, so ask for it when you already know HTTP comes back empty.
Implementations§
Trait Implementations§
Source§impl Clone for RequestMode
impl Clone for RequestMode
Source§fn clone(&self) -> RequestMode
fn clone(&self) -> RequestMode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for RequestMode
Source§impl Debug for RequestMode
impl Debug for RequestMode
Source§impl Default for RequestMode
impl Default for RequestMode
Source§fn default() -> RequestMode
fn default() -> RequestMode
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RequestMode
impl<'de> Deserialize<'de> for RequestMode
Source§fn deserialize<D>(
deserializer: D,
) -> Result<RequestMode, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<RequestMode, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for RequestMode
impl Display for RequestMode
impl Eq for RequestMode
Source§impl Hash for RequestMode
impl Hash for RequestMode
Source§impl PartialEq for RequestMode
impl PartialEq for RequestMode
Source§impl Serialize for RequestMode
impl Serialize for RequestMode
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for RequestMode
Auto Trait Implementations§
impl Forget for RequestMode
impl Freeze for RequestMode
impl Move for RequestMode
impl RefUnwindSafe for RequestMode
impl Send for RequestMode
impl Sync for RequestMode
impl Unpin for RequestMode
impl UnsafeUnpin for RequestMode
impl UnwindSafe for RequestMode
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