Skip to main content

Identity

Struct Identity 

Source
pub struct Identity {
Show 18 fields pub locale_code: &'static str, pub name_order: NameOrder, pub first_name: String, pub last_name: String, pub last_name2: String, pub first_ascii: String, pub last_ascii: String, pub archetype: HandleArchetype, pub birth_year: i64, pub birth_month: u8, pub birth_day: u8, pub nickname: Option<Nickname>, pub city: String, pub region: String, pub postal: String, pub lat: f64, pub lon: f64, pub tz: &'static str,
}
Expand description

Shared identity for context-aware generation (–ctx strict/loose).

Fields§

§locale_code: &'static str§name_order: NameOrder§first_name: String§last_name: String§last_name2: String§first_ascii: String§last_ascii: String§archetype: HandleArchetype§birth_year: i64

Birth year for tag correlation (nicknames, birthdate field).

§birth_month: u8

Birth month (1-12) — used for realistic numeric suffixes (DDMM/MMDD).

§birth_day: u8

Birth day (1-28) — used for realistic numeric suffixes (DDMM/MMDD).

§nickname: Option<Nickname>

Pre-computed nickname. None for NameOnly archetype.

§city: String§region: String§postal: String§lat: f64§lon: f64§tz: &'static str

Implementations§

Source§

impl Identity

Source

pub fn new( rng: &mut Rng, locales: &[&Locale], birth_year_range: Option<(i64, i64)>, since: i64, until: i64, ) -> Self

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.