Crates.io | bras |
lib.rs | bras |
version | 0.1.2 |
source | src |
created_at | 2024-02-05 17:19:17.692781 |
updated_at | 2024-02-05 18:16:40.194586 |
description | Library for parsing brazilian documents |
homepage | https://github.com/israelyago/bras |
repository | https://github.com/israelyago/bras |
max_upload_size | |
id | 1127776 |
size | 10,138 |
use core::str::FromStr;
use bras::{Cpf, ParseCpfError};
fn main() -> Result<(), ParseCpfError>{
let cpf = Cpf::try_from(1678346063)?;
let cpf = "01678346063".parse::<Cpf>()?;
let cpf: Cpf = "01678346063".parse()?;
let cpf = Cpf::from_str("01678346063")?; // Need: use core::str::FromStr;
Ok(())
}
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.