pub trait StrValidationExtension: StrSealed {
// Required method
fn as_string_validator(&self) -> StringValidator<'_>;
}
Expand description
A trait providing an extension for string validation functionality. This trait is sealed and
cannot be implemented outside the module where it is defined. It is designed to extend
the functionality of types implementing the private StrSealed
trait.
§Required Methods
as_string_validator
: Converts the type implementing this trait into aStringValidator
, enabling validation operations on the string.
§Note
The #[allow(private_bounds)]
attribute is used as this trait relies on the
private StrSealed
trait as a bound to enforce its sealing.
§Associated Types
- This trait does not introduce any associated types.
§Methods
as_string_validator(&'_ self) -> StringValidator<'_>
- Returns a
StringValidator
which allows performing validation operations on the implementing type. - This method borrows self for a lifetime (
'_
) and produces aStringValidator
tied to the lifetime of the reference.
- Returns a