protovalidate-buffa 0.0.0

Runtime for protoc-gen-protovalidate-buffa — Validate trait, ValidationError types, CEL integration, rule helpers.
Documentation
pub mod string {
    /// Canonical hyphenated UUID per RFC 4122 §3.
    ///
    /// Accepts the 36-character `8-4-4-4-12` hex form only; the `uuid`
    /// crate's `try_parse` also accepts simple (32-char), URN, and brace
    /// forms, which protovalidate's `string.uuid` rule rejects.
    // `const fn` is not possible here because `uuid::Uuid::try_parse` isn't
    // const. `Clippy::missing_const_for_fn` flags it anyway; silence the false
    // positive rather than refactor around an upstream limitation.
    #[allow(clippy::missing_const_for_fn)]
    #[must_use]
    pub fn is_uuid(s: &str) -> bool {
        s.len() == 36 && ::uuid::Uuid::try_parse(s).is_ok()
    }
}

pub mod float {
    #[must_use]
    pub const fn is_finite_f32(f: f32) -> bool {
        f.is_finite()
    }
    #[must_use]
    pub const fn is_finite_f64(f: f64) -> bool {
        f.is_finite()
    }
}