pub struct ParamRegistry { /* private fields */ }Expand description
Incremental collection of uniquely named parameter definitions.
Implementations§
Source§impl ParamRegistry
impl ParamRegistry
Sourcepub fn register<S>(&mut self, spec: S) -> ParamResult<ParamId>
pub fn register<S>(&mut self, spec: S) -> ParamResult<ParamId>
Registers a parameter and returns its stable identifier.
Re-registering an identical definition returns its existing identifier; incompatible definitions with the same name return an error.
§Errors
Returns ParamError::EmptyName when the parameter name is empty, or
ParamError::ParameterConflict when the name is already associated
with a different definition.
Sourcepub fn layout(&self) -> ParamResult<ParamLayout>
pub fn layout(&self) -> ParamResult<ParamLayout>
Validates the registered parameters and builds their layout.
§Errors
Returns ParamError when any registered definition has invalid
bounds, periodic metadata, scale, or initial or fixed values.
Trait Implementations§
Source§impl Clone for ParamRegistry
impl Clone for ParamRegistry
Source§impl Debug for ParamRegistry
impl Debug for ParamRegistry
Auto Trait Implementations§
impl Freeze for ParamRegistry
impl RefUnwindSafe for ParamRegistry
impl Send for ParamRegistry
impl Sync for ParamRegistry
impl Unpin for ParamRegistry
impl UnsafeUnpin for ParamRegistry
impl UnwindSafe for ParamRegistry
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