Struct worker::Cf

source · []
pub struct Cf { /* private fields */ }
Expand description

In addition to the methods on the Request struct, the Cf struct on an inbound Request contains information about the request provided by Cloudflare’s edge.

Details

Implementations

The three-letter airport code (e.g. ATX, LUX) representing the colocation which processed the request

The Autonomous System Number (ASN) of the request, e.g. 395747

The two-letter country code of origin for the request. This is the same value as that provided in the CF-IPCountry header, e.g. "US"

The HTTP Protocol (e.g. “HTTP/2”) used by the request

The browser-requested prioritization information in the request object,

See this blog post for details.

The cipher for the connection to Cloudflare, e.g. “AEAD-AES128-GCM-SHA256”.

Information about the client’s authorization. Only set when using Cloudflare Access or API Shield.

The TLS version of the connection to Cloudflare, e.g. TLSv1.3.

City of the incoming request, e.g. “Austin”.

Continent of the incoming request, e.g. “NA”

Latitude and longitude of the incoming request, e.g. (30.27130, -97.74260)

Postal code of the incoming request, e.g. “78701”

Metro code (DMA) of the incoming request, e.g. “635”

If known, the ISO 3166-2 name for the first level region associated with the IP address of the incoming request, e.g. “Texas”.

If known, the ISO 3166-2 code for the first level region associated with the IP address of the incoming request, e.g. “TX”.

Timezone of the incoming request

Trait Implementations

Formats the value using the given formatter. Read more

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.