Cargo Features
[dependencies]
protocheck = { version = "0.1.11", default-features = false, features = ["serde", "chrono", "cel", "totokens", "ip", "uri", "bytes", "regex"] }
- serde default
-
Enables serde support for protobuf well known types.
Enables serde of proto-types
- chrono default
-
Enables chrono of proto-types
proto-types:
Enables conversion to and from chrono types for the time-related structs.
- cel default
-
Enables validation with custom Cel expressions.
Enables cel of proto-types, protocheck-core, and protocheck-proc-macro
- totokens default
-
Enables the ToTokens trait for some enums and structs.
Enables totokens of proto-types and protocheck-core
- ip default
-
Enables complex validation for bytes or string fields, such as checking if an ip is a network address or not. Not necessary for simpler checks like checking if a field is a valid ip.
Enables ip of protocheck-core
- uri default
-
Enables validation for URIs.
Enables uri of protocheck-core
- bytes default
-
Enables validation for bytes fields.
Enables bytes of protocheck-core
- regex default
-
Enables the validators that use the Regex crate, such as 'pattern', or the well known strings such as 'header_name', 'email' and so on.
Enables regex of protocheck-core
- default = bytes, cel, chrono, ip, regex, serde, totokens, uri
-
These default features are set whenever
protocheckis added withoutsomewhere in the dependency tree.default-features = false