Skip to content

implemente HasLen trait #1178

@aimericsr

Description

@aimericsr

I write an axum application and I'm using the validator crate to validate the JSON body. I would like to use Secrete<String> for password to not leak sensitive information when I log the request but validator require that the type implement HasLen. I could implement it myself but in Rust we can't implement trait on external struct.

I was wondering if this was a security reason or if it is possible to implement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions