pub struct Ssn {
pub day: usize,
pub month: usize,
pub year: usize,
pub gender: Gender,
}
Fields§
§day: usize
§month: usize
§year: usize
§gender: Gender
Implementations§
source§impl Ssn
impl Ssn
sourcepub fn generate() -> String
pub fn generate() -> String
Generate random HETU.
Temporary HETU with identifier range of 900-999 will never be created. To generate a
temporary HETU, use Ssn::generate_by_pattern(pattern)
with pattern that explicity has ‘9’ as the
first character of the identifier part.
sourcepub fn generate_by_pattern(
pattern: &SsnPattern
) -> Result<String, GenerateError>
pub fn generate_by_pattern( pattern: &SsnPattern ) -> Result<String, GenerateError>
Generate HETU with matching fields.
sourcepub fn iter<'a>(pattern: &SsnPattern) -> impl Iterator<Item = String> + 'a
pub fn iter<'a>(pattern: &SsnPattern) -> impl Iterator<Item = String> + 'a
Iterator for generated HETUs with matching fields.
Trait Implementations§
impl Copy for Ssn
impl Eq for Ssn
impl StructuralPartialEq for Ssn
Auto Trait Implementations§
impl Freeze for Ssn
impl RefUnwindSafe for Ssn
impl Send for Ssn
impl Sync for Ssn
impl Unpin for Ssn
impl UnwindSafe for Ssn
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more