[−][src]Struct seed::browser::url::UrlSearch
Implementations
impl UrlSearch
[src]
pub fn new<K, V, VS>(params: impl IntoIterator<Item = (K, VS)>) -> Self where
K: Into<String>,
V: Into<String>,
VS: IntoIterator<Item = V>,
[src]
K: Into<String>,
V: Into<String>,
VS: IntoIterator<Item = V>,
Makes a new UrlSearch
with the provided parameters.
Examples
UrlSearch::new(vec![ ("sort", vec!["date", "name"]), ("category", vec!["top"]) ])
pub fn contains_key(&self, key: impl AsRef<str>) -> bool
[src]
Returns true
if the UrlSearch
contains a value for the specified key.
pub fn get(&self, key: impl AsRef<str>) -> Option<&Vec<String>>
[src]
Returns a reference to values corresponding to the key.
pub fn get_mut(&mut self, key: impl AsRef<str>) -> Option<&mut Vec<String>>
[src]
Returns a mutable reference to values corresponding to the key.
pub fn push_value<'a>(&mut self, key: impl Into<Cow<'a, str>>, value: String)
[src]
Push the value into the vector of values corresponding to the key.
- If the key and values are not present, they will be crated.
pub fn insert(
&mut self,
key: String,
values: Vec<String>
) -> Option<Vec<String>>
[src]
&mut self,
key: String,
values: Vec<String>
) -> Option<Vec<String>>
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.
pub fn remove(&mut self, key: impl AsRef<str>) -> Option<Vec<String>>
[src]
Removes a key from the UrlSearch
, returning values at the key
if the key was previously in the UrlSearch
.
pub fn iter(&self) -> impl Iterator<Item = (&String, &Vec<String>)>
[src]
Gets an iterator over the entries of the UrlSearch
, sorted by key.
pub fn invalid_components(&self) -> &[String]
[src]
Get invalid components.
Undecodable / unparsable components are invalid.
pub fn invalid_components_mut(&mut self) -> &mut Vec<String>
[src]
Get mutable invalid components.
Undecodable / unparsable components are invalid.
Trait Implementations
impl Clone for UrlSearch
[src]
impl Debug for UrlSearch
[src]
impl Default for UrlSearch
[src]
impl<'de> Deserialize<'de> for UrlSearch
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Display for UrlSearch
[src]
UrlSearch
components are automatically encoded.
impl From<UrlSearchParams> for UrlSearch
[src]
fn from(params: UrlSearchParams) -> Self
[src]
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.
impl PartialEq<UrlSearch> for UrlSearch
[src]
impl Serialize for UrlSearch
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralPartialEq for UrlSearch
[src]
Auto Trait Implementations
impl RefUnwindSafe for UrlSearch
impl Send for UrlSearch
impl Sync for UrlSearch
impl Unpin for UrlSearch
impl UnwindSafe for UrlSearch
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Sealed<T> for T where
T: ?Sized,
T: ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,