pub struct ValidationCode(/* private fields */);Expand description
Stable validation rule identity.
Codes are explicit at every emission site. New validator rules use a new identity rather than encoding ownership in prose.
Implementations§
Source§impl ValidationCode
impl ValidationCode
Sourcepub fn registered() -> impl ExactSizeIterator<Item = (&'static str, ValidationPhase)> + Clone
pub fn registered() -> impl ExactSizeIterator<Item = (&'static str, ValidationPhase)> + Clone
Iterate every registered validation rule and its sole owning phase.
The registry is the source for diagnostics tooling and documentation coverage. New rules must be added here before they can deserialize.
Sourcepub fn phase(&self) -> Option<ValidationPhase>
pub fn phase(&self) -> Option<ValidationPhase>
Return the sole validator phase allowed to emit this rule.
Trait Implementations§
Source§impl Clone for ValidationCode
impl Clone for ValidationCode
Source§fn clone(&self) -> ValidationCode
fn clone(&self) -> ValidationCode
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 ValidationCode
impl Debug for ValidationCode
Source§impl<'de> Deserialize<'de> for ValidationCode
impl<'de> Deserialize<'de> for ValidationCode
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
Source§impl Display for ValidationCode
impl Display for ValidationCode
impl Eq for ValidationCode
Source§impl Hash for ValidationCode
impl Hash for ValidationCode
Source§impl Ord for ValidationCode
impl Ord for ValidationCode
Source§fn cmp(&self, other: &ValidationCode) -> Ordering
fn cmp(&self, other: &ValidationCode) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ValidationCode
impl PartialEq for ValidationCode
Source§impl PartialOrd for ValidationCode
impl PartialOrd for ValidationCode
Source§impl Serialize for ValidationCode
impl Serialize for ValidationCode
impl StructuralPartialEq for ValidationCode
Auto Trait Implementations§
impl Freeze for ValidationCode
impl RefUnwindSafe for ValidationCode
impl Send for ValidationCode
impl Sync for ValidationCode
impl Unpin for ValidationCode
impl UnsafeUnpin for ValidationCode
impl UnwindSafe for ValidationCode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.