Expand description
Validation utilities for common operations
This module follows the “Parse, don’t validate” pattern:
boundary functions transform raw input into types that carry
their invariants (NonEmptyString, NonEmptyVec, NonEmptySlice),
so downstream code never re-checks.
Structs§
- Empty
Collection Error - Error returned when a collection is empty but at least one element is required.
- NonEmpty
Slice - A borrowed slice guaranteed to contain at least one element.
- NonEmpty
String - A validated string that is guaranteed to be non-empty after trimming.
- NonEmpty
Vec - A vector guaranteed to contain at least one element.
Functions§
- validate_
all_ non_ empty - Validate that all strings in a slice are non-empty
- validate_
identifier - Validate alphanumeric identifier
- validate_
is_ directory - Validate path is a directory
- validate_
is_ file - Validate path is a file
- validate_
non_ empty - Validate that a string is non-empty
- validate_
non_ empty_ collection - Validate collection is not empty
- validate_
non_ empty_ string - Validate and return non-empty string
- validate_
optional_ non_ empty - Validate optional non-empty string
- validate_
path_ exists - Validate path exists
- validate_
url_ format - Basic URL format validation