valid 0.3.1

Validate custom types by composing primitive validation functions. Use one common API for validating all kind of business rules including aspects of the application state. One common error type for all kind of constraint violations. It is designed to help with error messages that are meaningful to the user of an application.
Documentation

Build #3702625 2026-06-27 20:05:23

# rustc version rustc 1.98.0-nightly (ce9954c0c 2026-06-26)

# docs.rs version docsrs 0.0.0 (886bc7a22b1adc4b387ce1343447fe3af98d9ce5 2026-06-14 )

# build log [INFO] running `Command { std: "docker" "exec" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "DOCS_RS=1" "-w" "/opt/rustwide/workdir" "--user" "1001:1001" "ae61d15d68efb012e8573e79a3c6adbfa251edde4ea50e78c3f40185f81eb9f5" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "rustdoc" "--lib" "-Zrustdoc-map" "--all-features" "--config" "build.rustdocflags=[\"--cfg\", \"docsrs\", \"-Z\", \"unstable-options\", \"--emit=invocation-specific\", \"--resource-suffix\", \"-20260626-1.98.0-nightly-ce9954c0c\", \"--static-root-path\", \"/-/rustdoc.static/\", \"--cap-lints\", \"warn\", \"--extern-html-root-takes-precedence\"]" "--offline" "-Zunstable-options" "--config=doc.extern-map.registries.crates-io=\"https://docs.rs/{pkg_name}/{version}/x86_64-unknown-linux-gnu\"" "-Zrustdoc-scrape-examples" "-j6" "--target" "x86_64-unknown-linux-gnu", kill_on_drop: false }` [INFO] [stderr] warning: target filter specified, but no targets matched; this is a no-op [INFO] [stderr] Documenting valid v0.3.1 (/opt/rustwide/workdir) [INFO] [stderr] warning: unclosed HTML tag `variant` [INFO] [stderr] --> src/constraint/mod.rs:10:9 [INFO] [stderr] | [INFO] [stderr] 10 | //! The <variant> part is optional and only present if the constraint has some [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(rustdoc::invalid_html_tags)]` on by default [INFO] [stderr] [INFO] [stderr] warning: unexpected character `/` [INFO] [stderr] --> src/core/mod.rs:20:1 [INFO] [stderr] | [INFO] [stderr] 20 | / /// A wrapper type to express that the value of type `T` has been validated by [INFO] [stderr] 21 | | /// the constraint `C`. [INFO] [stderr] 22 | | /// [INFO] [stderr] 23 | | /// The idea is that an instance of `Validated<C, T>` can only be obtained by [INFO] [stderr] ... | [INFO] [stderr] 111 | | /// trait. Unfortunately I have no idea how to prevent this. [INFO] [stderr] 112 | | /// Fortunately such code can be found by (automated) code review. [INFO] [stderr] | |________________________________________________________________________^ [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(rustdoc::invalid_codeblock_attributes)]` on by default [INFO] [stderr] [INFO] [stderr] warning: `valid` (lib doc) generated 2 warnings [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.90s [INFO] [stderr] Generated /opt/rustwide/target/x86_64-unknown-linux-gnu/doc/valid/index.html [INFO] running `Command { std: "docker" "inspect" "ae61d15d68efb012e8573e79a3c6adbfa251edde4ea50e78c3f40185f81eb9f5", kill_on_drop: false }`