pub struct UrlSearch { /* private fields */ }

Implementations

Makes a new UrlSearch with the provided parameters.

Examples
UrlSearch::new(vec![
    ("sort", vec!["date", "name"]),
    ("category", vec!["top"])
])

Returns true if the UrlSearch contains a value for the specified key.

Returns a reference to values corresponding to the key.

Returns a mutable reference to values corresponding to the key.

Push the value into the vector of values corresponding to the key.

  • If the key and values are not present, they will be crated.

Inserts a key-values pair into the UrlSearch.

  • If the UrlSearch did not have this key present, None is returned.
  • If the UrlSearch did have this key present, old values are overwritten by new ones, and old values are returned. The key is not updated.

Removes a key from the UrlSearch, returning values at the key if the key was previously in the UrlSearch.

Gets an iterator over the entries of the UrlSearch, sorted by key.

Get invalid components.

Undecodable / unparsable components are invalid.

Get mutable invalid components.

Undecodable / unparsable components are invalid.

Trait Implementations

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

Deserialize this value from the given Serde deserializer. Read more

UrlSearch components are automatically encoded.

Formats the value using the given formatter. Read more

Creates a new UrlSearch from the browser native UrlSearchParams. UrlSearch’s components are decoded if possible. When decoding fails, the component is cloned into invalid_components and the original value is used.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. 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

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

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

Converts the given value to a String. 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.