pub struct Params { /* private fields */ }Implementations§
Source§impl Params
impl Params
Sourcepub fn set_defaults(&mut self)
pub fn set_defaults(&mut self)
Resets all parameters to their default values.
Sourcepub fn get_by_id(&self, id: ParamId) -> ParamValue
pub fn get_by_id(&self, id: ParamId) -> ParamValue
Gets a parameter’s value by its type-safe ID. Returns a copy.
Sourcepub fn set_by_id(&mut self, id: ParamId, value: ParamValue)
pub fn set_by_id(&mut self, id: ParamId, value: ParamValue)
Sets a parameter’s value by its type-safe ID.
Sourcepub fn get_by_name(&self, name: &str) -> Option<ParamValue>
pub fn get_by_name(&self, name: &str) -> Option<ParamValue>
Gets a parameter’s value by its string name. Returns None if not found.
Sourcepub fn set_by_name(&mut self, name: &str, value: ParamValue) -> bool
pub fn set_by_name(&mut self, name: &str, value: ParamValue) -> bool
Sets a parameter’s value by its string name. Returns true on success.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Params
impl RefUnwindSafe for Params
impl Send for Params
impl Sync for Params
impl Unpin for Params
impl UnsafeUnpin for Params
impl UnwindSafe for Params
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,
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.