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§fn clone(&self) -> ParamRegistry
fn clone(&self) -> ParamRegistry
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 ParamRegistry
impl Debug for ParamRegistry
Source§impl Default for ParamRegistry
impl Default for ParamRegistry
Source§fn default() -> ParamRegistry
fn default() -> ParamRegistry
Returns the “default value” for a type. Read more
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