bras

Crates.iobras
lib.rsbras
version0.1.2
sourcesrc
created_at2024-02-05 17:19:17.692781
updated_at2024-02-05 18:16:40.194586
descriptionLibrary for parsing brazilian documents
homepagehttps://github.com/israelyago/bras
repositoryhttps://github.com/israelyago/bras
max_upload_size
id1127776
size10,138
(israelyago)

documentation

README

Examples

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(())
}

License

Licensed under either of

at your option.

Contribution

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.

Commit count: 0

cargo fmt