Skip to main content

Key

Enum Key 

Source
#[non_exhaustive]
#[repr(u8)]
pub enum Key {
Show 80 variants Url = 0, Request = 1, Proxy = 2, CountryCode = 3, RemoteProxy = 4, Stealth = 5, Fingerprint = 6, UserAgent = 7, Viewport = 8, Locale = 9, Cookies = 10, Headers = 11, Encoding = 12, Storageless = 13, Session = 14, RedirectPolicy = 15, RequestTimeout = 16, ServiceWorkerEnabled = 17, PreserveHost = 18, Delay = 19, ConcurrencyLimit = 20, Wayback = 21, Limit = 22, Depth = 23, Budget = 24, Blacklist = 25, Whitelist = 26, Subdomains = 27, Tld = 28, ExternalDomains = 29, Sitemap = 30, SitemapOnly = 31, SitemapPath = 32, RespectRobots = 33, LinkRewrite = 34, CrawlTimeout = 35, RunInBackground = 36, WaitIdleMillis = 37, Scroll = 38, ExecutionScripts = 39, AutomationScripts = 40, EvaluateOnNewDocument = 41, DisableIntercept = 42, FullResources = 43, BlockAds = 44, BlockAnalytics = 45, BlockStylesheets = 46, DisableFirstPartyStylesheets = 47, DisableFirstPartyJavascript = 48, DisableFirstPartyVisuals = 49, NetworkWhitelist = 50, NetworkBlacklist = 51, EventTracker = 52, ReturnFormat = 53, RootSelector = 54, ExcludeSelector = 55, FilterOutputImages = 56, FilterOutputSvg = 57, FilterOutputMainOnly = 58, MaxSize = 59, Readability = 60, CleanHtml = 61, CssExtractionMap = 62, ChunkingAlg = 63, Metadata = 64, ReturnEmbeddings = 65, ReturnHeaders = 66, ReturnCookies = 67, ReturnPageLinks = 68, ReturnJsonData = 69, Text = 70, Cache = 71, Webhooks = 72, DataConnectors = 73, Router = 74, ProviderOptions = 75, MaxCreditsAllowed = 76, MaxCreditsPerPage = 77, DisableHints = 78, SkipConfigChecks = 79,
}
Expand description

One field of the request body.

Declared in the order RequestParams declares its fields, so Key::index is stable for a given schema version. WaitIdleMillis stands for wait_for, because the only wait an edit writes is an idle network wait.

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.
§

Url = 0

url

§

Request = 1

request

§

Proxy = 2

proxy

§

CountryCode = 3

country_code

§

RemoteProxy = 4

remote_proxy

§

Stealth = 5

stealth

§

Fingerprint = 6

fingerprint

§

UserAgent = 7

user_agent

§

Viewport = 8

viewport

§

Locale = 9

locale

§

Cookies = 10

cookies

§

Headers = 11

headers

§

Encoding = 12

encoding

§

Storageless = 13

storageless

§

Session = 14

session

§

RedirectPolicy = 15

redirect_policy

§

RequestTimeout = 16

request_timeout

§

ServiceWorkerEnabled = 17

service_worker_enabled

§

PreserveHost = 18

preserve_host

§

Delay = 19

delay

§

ConcurrencyLimit = 20

concurrency_limit

§

Wayback = 21

wayback

§

Limit = 22

limit

§

Depth = 23

depth

§

Budget = 24

budget

§

Blacklist = 25

blacklist

§

Whitelist = 26

whitelist

§

Subdomains = 27

subdomains

§

Tld = 28

tld

§

ExternalDomains = 29

external_domains

§

Sitemap = 30

sitemap

§

SitemapOnly = 31

sitemap_only

§

SitemapPath = 32

sitemap_path

§

RespectRobots = 33

respect_robots

§

LinkRewrite = 34

link_rewrite

§

CrawlTimeout = 35

crawl_timeout

§

RunInBackground = 36

run_in_background

§

WaitIdleMillis = 37

wait_for, as an idle network wait in milliseconds.

§

Scroll = 38

scroll

§

ExecutionScripts = 39

execution_scripts

§

AutomationScripts = 40

automation_scripts

§

EvaluateOnNewDocument = 41

evaluate_on_new_document

§

DisableIntercept = 42

disable_intercept

§

FullResources = 43

full_resources

§

BlockAds = 44

block_ads

§

BlockAnalytics = 45

block_analytics

§

BlockStylesheets = 46

block_stylesheets

§

DisableFirstPartyStylesheets = 47

disable_first_party_stylesheets

§

DisableFirstPartyJavascript = 48

disable_first_party_javascript

§

DisableFirstPartyVisuals = 49

disable_first_party_visuals

§

NetworkWhitelist = 50

network_whitelist

§

NetworkBlacklist = 51

network_blacklist

§

EventTracker = 52

event_tracker

§

ReturnFormat = 53

return_format

§

RootSelector = 54

root_selector

§

ExcludeSelector = 55

exclude_selector

§

FilterOutputImages = 56

filter_output_images

§

FilterOutputSvg = 57

filter_output_svg

§

FilterOutputMainOnly = 58

filter_output_main_only

§

MaxSize = 59

max_size

§

Readability = 60

readability

§

CleanHtml = 61

clean_html

§

CssExtractionMap = 62

css_extraction_map

§

ChunkingAlg = 63

chunking_alg

§

Metadata = 64

metadata

§

ReturnEmbeddings = 65

return_embeddings

§

ReturnHeaders = 66

return_headers

§

ReturnCookies = 67

return_cookies

return_page_links

§

ReturnJsonData = 69

return_json_data

§

Text = 70

text

§

Cache = 71

cache

§

Webhooks = 72

webhooks

§

DataConnectors = 73

data_connectors

§

Router = 74

router

§

ProviderOptions = 75

provider_options

§

MaxCreditsAllowed = 76

max_credits_allowed

§

MaxCreditsPerPage = 77

max_credits_per_page

§

DisableHints = 78

disable_hints

§

SkipConfigChecks = 79

skip_config_checks

Implementations§

Source§

impl Key

Source

pub const ALL: &'static [Key]

Every key, in index order.

Source

pub const fn index(self) -> usize

Where this key sits in Key::ALL and in the spec table.

Source

pub const fn wire(self) -> &'static str

The field name on the wire.

Trait Implementations§

Source§

impl Clone for Key

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Key

Source§

impl Debug for Key

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Key

Source§

impl Hash for Key

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for Key

Source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

fn clamp_to<R>(self, range: R) -> Self
where Self: Sized, R: ClampBounds<Self>,

🔬This is a nightly-only experimental API. (clamp_to)
Restrict a value to a certain range. Read more
Source§

impl PartialEq for Key

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialOrd for Key

Source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl StructuralPartialEq for Key

Auto Trait Implementations§

§

impl Forget for Key

§

impl Freeze for Key

§

impl Move for Key

§

impl RefUnwindSafe for Key

§

impl Send for Key

§

impl Sync for Key

§

impl Unpin for Key

§

impl UnsafeUnpin for Key

§

impl UnwindSafe for Key

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<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.