Skip to content

Support NonZero types #269

@timvisee

Description

@timvisee

I'd like to see support for NonZero types from the standard library such as NonZeroU64. We'd like to use this in Qdrant.

For example:

#[derive(Debug, Validate)]
struct TestStruct {
    #[validate(range(min = 5, max = 10))]
    val: NonZeroU64,
}

Is this something that can be implemented within this crate, or is it out of scope?

I started an implementation in #270.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions