[go: up one dir, main page]

Struct worker::Headers[][src]

pub struct Headers(pub EdgeHeaders);
Expand description

A Headers representation used in Request and Response objects.

Tuple Fields

0: EdgeHeaders

Implementations

Construct a new Headers struct.

Returns all the values of a header within a Headers object with a given name. Returns an error if the name is invalid (e.g. contains spaces)

Returns a boolean stating whether a Headers object contains a certain header. Returns an error if the name is invalid (e.g. contains spaces)

Returns an error if the name is invalid (e.g. contains spaces)

Sets a new value for an existing header inside a Headers object, or adds the header if it does not already exist. Returns an error if the name is invalid (e.g. contains spaces)

Deletes a header from a Headers object. Returns an error if the name is invalid (e.g. contains spaces) or if the JS Headers objects’s guard is immutable (e.g. for an incoming request)

Returns an iterator allowing to go through all key/value pairs contained in this object.

Returns an iterator allowing you to go through all keys of the key/value pairs contained in this object.

Returns an iterator allowing you to go through all values of the key/value pairs contained in this object.

Trait Implementations

Performs the conversion.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Creates a value from an iterator. Read more

Creates a value from an iterator. Read more

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

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 resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.