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.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Args
impl<'de> Deserialize<'de> for Args
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Args
impl StructuralPartialEq for Args
Auto Trait Implementations§
impl Freeze for Args
impl RefUnwindSafe for Args
impl Send for Args
impl Sync for Args
impl Unpin for Args
impl UnwindSafe for Args
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)