pub struct ParamValues { /* private fields */ }Expand description
Concrete full-layout parameter values paired with their defining layout.
Implementations§
Source§impl ParamValues
impl ParamValues
Sourcepub fn layout(&self) -> &Arc<ParamLayout>
pub fn layout(&self) -> &Arc<ParamLayout>
Returns the shared layout that interprets these values.
Sourcepub fn get(&self, id: ParamId) -> ParamResult<f64>
pub fn get(&self, id: ParamId) -> ParamResult<f64>
Returns the value associated with a full-layout identifier.
§Errors
Returns ParamError::InvalidParamId when id is outside the shared
layout.
Sourcepub fn free_values(&self) -> Vec<f64>
pub fn free_values(&self) -> Vec<f64>
Copies the values of free parameters in free-parameter order.
Sourcepub fn set_free(&mut self, id: FreeParamId, value: f64) -> ParamResult<()>
pub fn set_free(&mut self, id: FreeParamId, value: f64) -> ParamResult<()>
Assigns one value by its free-parameter identifier.
§Errors
Returns ParamError::InvalidFreeParamId when id is outside the
shared layout’s free-parameter ordering.
Sourcepub fn set_free_values(&mut self, values: &[f64]) -> ParamResult<()>
pub fn set_free_values(&mut self, values: &[f64]) -> ParamResult<()>
Replaces all free values and restores fixed values from the layout.
§Errors
Returns ParamError::FreeLengthMismatch when values does not
contain exactly one value per free parameter.
Trait Implementations§
Source§impl Clone for ParamValues
impl Clone for ParamValues
Source§fn clone(&self) -> ParamValues
fn clone(&self) -> ParamValues
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ParamValues
impl Debug for ParamValues
Source§impl<'de> Deserialize<'de> for ParamValues
impl<'de> Deserialize<'de> for ParamValues
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
Auto Trait Implementations§
impl Freeze for ParamValues
impl RefUnwindSafe for ParamValues
impl Send for ParamValues
impl Sync for ParamValues
impl Unpin for ParamValues
impl UnsafeUnpin for ParamValues
impl UnwindSafe for ParamValues
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