pub struct Options(/* private fields */);
Expand description
A collection of named parameters.
Implementations§
Source§impl Options
impl Options
Sourcepub fn get_ref<T: Any>(&self, name: &str) -> Option<&T>
pub fn get_ref<T: Any>(&self, name: &str) -> Option<&T>
Get a reference to the value of a parameter.
Sourcepub fn get_mut<T: Any>(&mut self, name: &str) -> Option<&mut T>
pub fn get_mut<T: Any>(&mut self, name: &str) -> Option<&mut T>
Get a mutable reference to the value of a parameter.
Sourcepub fn set<T: Into<String>, U: Any>(
&mut self,
name: T,
value: U,
) -> &mut Options
pub fn set<T: Into<String>, U: Any>( &mut self, name: T, value: U, ) -> &mut Options
Set the value of a parameter.
Sourcepub fn iter(&self) -> Parameters<'_> ⓘ
pub fn iter(&self) -> Parameters<'_> ⓘ
Return an iterator over parameters.
Sourcepub fn iter_mut(&mut self) -> ParametersMut<'_> ⓘ
pub fn iter_mut(&mut self) -> ParametersMut<'_> ⓘ
Return an iterator over mutable parameters.
Trait Implementations§
Source§impl<'l> IntoIterator for &'l Options
impl<'l> IntoIterator for &'l Options
Source§impl<'l> IntoIterator for &'l mut Options
impl<'l> IntoIterator for &'l mut Options
Auto Trait Implementations§
impl Freeze for Options
impl !RefUnwindSafe for Options
impl !Send for Options
impl !Sync for Options
impl Unpin for Options
impl !UnwindSafe for Options
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