pub struct RuleMetadata {
pub rule: ValidationRule,
pub overrideable: bool,
pub inherited: bool,
pub source: String,
}Expand description
Metadata about a validation rule for inheritance tracking.
Fields§
§rule: ValidationRuleThe validation rule
overrideable: boolWhether this rule can be overridden by child types
inherited: boolWhether this rule is inherited from a parent type
source: StringThe source type name for tracking
Implementations§
Source§impl RuleMetadata
impl RuleMetadata
Sourcepub fn new(rule: ValidationRule, source: impl Into<String>) -> Self
pub fn new(rule: ValidationRule, source: impl Into<String>) -> Self
Create a new rule metadata from a validation rule.
Sourcepub fn non_overrideable(self) -> Self
pub fn non_overrideable(self) -> Self
Mark this rule as non-overrideable.
Sourcepub fn as_inherited(self) -> Self
pub fn as_inherited(self) -> Self
Mark this rule as inherited.
Trait Implementations§
Source§impl Clone for RuleMetadata
impl Clone for RuleMetadata
Source§fn clone(&self) -> RuleMetadata
fn clone(&self) -> RuleMetadata
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RuleMetadata
impl RefUnwindSafe for RuleMetadata
impl Send for RuleMetadata
impl Sync for RuleMetadata
impl Unpin for RuleMetadata
impl UnsafeUnpin for RuleMetadata
impl UnwindSafe for RuleMetadata
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