pub struct Args { /* private fields */ }
Expand description
Arbitrary arguments and parameters.
Implementations§
source§impl Args
impl Args
sourcepub fn get<V: FromStr<Err = impl Error>>(
&self,
key: impl AsRef<str>
) -> Result<V, Error>
pub fn get<V: FromStr<Err = impl Error>>(
&self,
key: impl AsRef<str>
) -> Result<V, Error>
Try to get a value of type V
that is tried to be parsed from the string mapped by the
key
.
sourcepub fn set<K: Into<String>, V: Into<String>>(
&mut self,
key: K,
value: V
) -> Option<String>
pub fn set<K: Into<String>, V: Into<String>>(
&mut self,
key: K,
value: V
) -> Option<String>
Map the key
the stringified value
.
sourcepub fn remove<K: AsRef<str>>(&mut self, key: K) -> Option<String>
pub fn remove<K: AsRef<str>>(&mut self, key: K) -> Option<String>
Remove the key
together with its associated value.
sourcepub fn iter_mut(&mut self) -> IterMut<'_, String, String>
pub fn iter_mut(&mut self) -> IterMut<'_, String, String>
Iterate mutably over key-value pairs of the Args
.
sourcepub fn deserialize<D: for<'a> Deserialize<'a>>(&self) -> Option<D>
pub fn deserialize<D: for<'a> Deserialize<'a>>(&self) -> Option<D>
Try to Deserialize
a value of type D
from the JSON-serialized Args
.