Struct worker_plus::Headers

source ·
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§

Converts this type into a shared reference of the (usually inferred) input type.
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
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.