pub struct ControlDefinition {
pub id: &'static str,
pub label: &'static str,
pub docs: &'static str,
pub kind: ControlKind,
}Fields§
§id: &'static str§label: &'static str§docs: &'static str§kind: ControlKindImplementations§
Source§impl ControlDefinition
impl ControlDefinition
Sourcepub fn validate(&self, value: &ControlValue) -> Result<(), ControlError>
pub fn validate(&self, value: &ControlValue) -> Result<(), ControlError>
Validates metadata-level constraints before a typed field accepts a value.
§Errors
Returns an error when a numeric value violates configured bounds or step.
Trait Implementations§
Source§impl Clone for ControlDefinition
impl Clone for ControlDefinition
Source§fn clone(&self) -> ControlDefinition
fn clone(&self) -> ControlDefinition
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 moreimpl Copy for ControlDefinition
Source§impl Debug for ControlDefinition
impl Debug for ControlDefinition
Source§impl PartialEq for ControlDefinition
impl PartialEq for ControlDefinition
impl StructuralPartialEq for ControlDefinition
Auto Trait Implementations§
impl Freeze for ControlDefinition
impl RefUnwindSafe for ControlDefinition
impl Send for ControlDefinition
impl Sync for ControlDefinition
impl Unpin for ControlDefinition
impl UnsafeUnpin for ControlDefinition
impl UnwindSafe for ControlDefinition
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