Expand description
Provides a TurkishId
data type that holds a valid Turkish citizenship ID number.
ID numbers can also be directly validated on &str
’s by using is_valid
function.
Examples
Validate a Turkish citizenship ID number:
if trid::is_valid("12345678901") {
// yayyy!
}
Try parsing a string into TurkishId
:
use trid::*;
fn test() -> Result<TurkishId, Error> {
let id : TurkishId = "12345678901".parse()?;
Ok(id)
}
License
Apache License Version 2.0, see LICENSE file for details.
Structs
- Turkish citizenship ID number. The number is stored as ASCII digits “0”..“9” in the structure.
Enums
- Represents the parser error for a given Turkish citizenship ID number.
Constants
Functions
- Checks if the given string slice is a valid Turkish citizenship ID number.