pub struct Options(_);
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<'l, T: Any>(&'l mut self, name: &str, value: T) -> &'l mut Options
pub fn set<'l, T: Any>(&'l mut self, name: &str, value: T) -> &'l 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 !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