Struct brids::Cnpj[][src]

pub struct Cnpj { /* fields omitted */ }

A valid CNPJ number. Parsing recognizes numbers with or without separators (dot, minus, slash, and space).

Methods

impl Cnpj
[src]

Returns a byte slice of the numbers.

Examples

use brids::Cnpj;

let cnpj = Cnpj::generate();
let bytes = cnpj.as_bytes();

Generates a random number, using rand::thread_rng (optional dependency enabled by default). To use a different generator, instantiate the generator directly.

Examples

Basic use:

use brids::Cnpj;

let cnpj = Cnpj::generate();

Trait Implementations

impl Clone for Cnpj
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for Cnpj
[src]

impl PartialEq for Cnpj
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Cnpj
[src]

impl Hash for Cnpj
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl Debug for Cnpj
[src]

Formats the value using the given formatter. Read more

impl Display for Cnpj
[src]

Formats the value using the given formatter. Read more

impl FromStr for Cnpj
[src]

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more

impl Rand for Cnpj
[src]

Generates a random instance of this type using the specified source of randomness. Read more

Auto Trait Implementations

impl Send for Cnpj

impl Sync for Cnpj