Skip to main content

Key

Enum Key 

Source
#[non_exhaustive]
#[repr(u8)]
pub enum Key {
Show 76 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, Session = 13, RedirectPolicy = 14, RequestTimeout = 15, ServiceWorkerEnabled = 16, Delay = 17, ConcurrencyLimit = 18, Wayback = 19, Limit = 20, Depth = 21, Budget = 22, Blacklist = 23, Whitelist = 24, Subdomains = 25, Tld = 26, ExternalDomains = 27, Sitemap = 28, SitemapOnly = 29, SitemapPath = 30, RespectRobots = 31, LinkRewrite = 32, CrawlTimeout = 33, RunInBackground = 34, WaitIdleMillis = 35, Scroll = 36, ExecutionScripts = 37, AutomationScripts = 38, EvaluateOnNewDocument = 39, DisableIntercept = 40, FullResources = 41, BlockAds = 42, BlockAnalytics = 43, BlockStylesheets = 44, DisableFirstPartyStylesheets = 45, DisableFirstPartyJavascript = 46, DisableFirstPartyVisuals = 47, NetworkWhitelist = 48, NetworkBlacklist = 49, EventTracker = 50, ReturnFormat = 51, RootSelector = 52, ExcludeSelector = 53, FilterOutputImages = 54, FilterOutputSvg = 55, FilterOutputMainOnly = 56, MaxSize = 57, Readability = 58, CleanHtml = 59, CssExtractionMap = 60, ChunkingAlg = 61, Metadata = 62, ReturnEmbeddings = 63, ReturnHeaders = 64, ReturnCookies = 65, ReturnPageLinks = 66, ReturnJsonData = 67, Cache = 68, Webhooks = 69, DataConnectors = 70, Router = 71, ProviderOptions = 72, MaxCreditsAllowed = 73, MaxCreditsPerPage = 74, DisableHints = 75,
}
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

§

Session = 13

session

§

RedirectPolicy = 14

redirect_policy

§

RequestTimeout = 15

request_timeout

§

ServiceWorkerEnabled = 16

service_worker_enabled

§

Delay = 17

delay

§

ConcurrencyLimit = 18

concurrency_limit

§

Wayback = 19

wayback

§

Limit = 20

limit

§

Depth = 21

depth

§

Budget = 22

budget

§

Blacklist = 23

blacklist

§

Whitelist = 24

whitelist

§

Subdomains = 25

subdomains

§

Tld = 26

tld

§

ExternalDomains = 27

external_domains

§

Sitemap = 28

sitemap

§

SitemapOnly = 29

sitemap_only

§

SitemapPath = 30

sitemap_path

§

RespectRobots = 31

respect_robots

§

LinkRewrite = 32

link_rewrite

§

CrawlTimeout = 33

crawl_timeout

§

RunInBackground = 34

run_in_background

§

WaitIdleMillis = 35

wait_for, as an idle network wait in milliseconds.

§

Scroll = 36

scroll

§

ExecutionScripts = 37

execution_scripts

§

AutomationScripts = 38

automation_scripts

§

EvaluateOnNewDocument = 39

evaluate_on_new_document

§

DisableIntercept = 40

disable_intercept

§

FullResources = 41

full_resources

§

BlockAds = 42

block_ads

§

BlockAnalytics = 43

block_analytics

§

BlockStylesheets = 44

block_stylesheets

§

DisableFirstPartyStylesheets = 45

disable_first_party_stylesheets

§

DisableFirstPartyJavascript = 46

disable_first_party_javascript

§

DisableFirstPartyVisuals = 47

disable_first_party_visuals

§

NetworkWhitelist = 48

network_whitelist

§

NetworkBlacklist = 49

network_blacklist

§

EventTracker = 50

event_tracker

§

ReturnFormat = 51

return_format

§

RootSelector = 52

root_selector

§

ExcludeSelector = 53

exclude_selector

§

FilterOutputImages = 54

filter_output_images

§

FilterOutputSvg = 55

filter_output_svg

§

FilterOutputMainOnly = 56

filter_output_main_only

§

MaxSize = 57

max_size

§

Readability = 58

readability

§

CleanHtml = 59

clean_html

§

CssExtractionMap = 60

css_extraction_map

§

ChunkingAlg = 61

chunking_alg

§

Metadata = 62

metadata

§

ReturnEmbeddings = 63

return_embeddings

§

ReturnHeaders = 64

return_headers

§

ReturnCookies = 65

return_cookies

return_page_links

§

ReturnJsonData = 67

return_json_data

§

Cache = 68

cache

§

Webhooks = 69

webhooks

§

DataConnectors = 70

data_connectors

§

Router = 71

router

§

ProviderOptions = 72

provider_options

§

MaxCreditsAllowed = 73

max_credits_allowed

§

MaxCreditsPerPage = 74

max_credits_per_page

§

DisableHints = 75

disable_hints

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.