Skip to main content

Crate koruma_core

Crate koruma_core 

Source
Expand description

§koruma-core

Docs Crates.io

Core traits and types for the koruma validation ecosystem. Most users should depend on koruma instead of this crate directly.

§What it provides

  • Validate<T>: implemented by validator structs.
  • ValidationError: implemented by generated error structs.
  • BuilderWithValue<T>: implemented by #[koruma::validator] builders for with_value().
  • ValidateExt: used for nested/newtype validation.
  • NewtypeValidation: marker for newtype structs with transparent error access.

Traits§

BuilderWithValue
Trait for validator builders that can receive the value being validated.
NewtypeValidation
Marker trait for newtype structs (single-field wrappers) that derive Koruma.
Validate
Trait for types that can validate a value of type T.
ValidateExt
Trait for structs that derive Koruma and have a validate() method.
ValidationError
Trait for validation error structs that have no errors.