pub struct Options(_);Expand description
A collection of named parameters.
Implementations§
source§impl Options
impl Options
sourcepub fn get<T>(&self, name: &str) -> Option<T>where
T: Any + Clone,
pub fn get<T>(&self, name: &str) -> Option<T>where T: Any + Clone,
Get the value of a parameter.
sourcepub fn get_ref<T>(&self, name: &str) -> Option<&T>where
T: Any,
pub fn get_ref<T>(&self, name: &str) -> Option<&T>where T: Any,
Get a reference to the value of a parameter.
sourcepub fn get_mut<T>(&mut self, name: &str) -> Option<&mut T>where
T: Any,
pub fn get_mut<T>(&mut self, name: &str) -> Option<&mut T>where T: Any,
Get a mutable reference to the value of a parameter.
sourcepub fn set<T, 'l>(&'l mut self, name: &str, value: T) -> &'l mut Optionswhere
T: Any,
pub fn set<T, 'l>(&'l mut self, name: &str, value: T) -> &'l mut Optionswhere T: Any,
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