pub struct Faker;Expand description
Faker — Generator Data Realistis Ringan Berkecepatan Tinggi (Native Rust) Dioptimalkan untuk lokalisasi Indonesia dan internasional tanpa dependensi eksternal.
Implementations§
Source§impl Faker
impl Faker
pub const FIRST_NAMES_MALE: &'static [&'static str]
pub const FIRST_NAMES_FEMALE: &'static [&'static str]
pub const LAST_NAMES: &'static [&'static str]
pub const DOMAINS: &'static [&'static str]
pub const PHONE_PREFIXES: &'static [&'static str]
pub const CITIES: &'static [&'static str]
pub const STREETS: &'static [&'static str]
pub const COMPANY_TYPES: &'static [&'static str]
pub const COMPANY_NAMES: &'static [&'static str]
pub const WORDS: &'static [&'static str]
Sourcepub fn first_name_male() -> &'static str
pub fn first_name_male() -> &'static str
Menghasilkan nama depan pria Indonesia
Sourcepub fn first_name_female() -> &'static str
pub fn first_name_female() -> &'static str
Menghasilkan nama depan wanita Indonesia
Sourcepub fn first_name() -> &'static str
pub fn first_name() -> &'static str
Menghasilkan nama depan acak
Sourcepub fn unique_email() -> String
pub fn unique_email() -> String
Menghasilkan alamat email yang dijamin unik di seluruh thread
Sourcepub fn phone() -> String
pub fn phone() -> String
Menghasilkan nomor telepon seluler format Indonesia (misal: 081234567890)
Sourcepub fn number(min: usize, max: usize) -> usize
pub fn number(min: usize, max: usize) -> usize
Menghasilkan angka integer acak dalam rentang [min, max]
Sourcepub fn rupiah_amount(min: usize, max: usize) -> usize
pub fn rupiah_amount(min: usize, max: usize) -> usize
Menghasilkan nominal Rupiah (integer)
Sourcepub fn rupiah(min: usize, max: usize) -> String
pub fn rupiah(min: usize, max: usize) -> String
Menghasilkan string terformat Rupiah (misal: “Rp 150.000”)
Sourcepub fn boolean(chance_percent: usize) -> bool
pub fn boolean(chance_percent: usize) -> bool
Menghasilkan boolean acak dengan peluang kemunculan true tertentu (default: 50%)
Sourcepub fn date_recent() -> String
pub fn date_recent() -> String
Menghasilkan tanggal acak dalam format string YYYY-MM-DD
Sourcepub fn datetime_recent() -> String
pub fn datetime_recent() -> String
Menghasilkan timestamp datetime acak dalam format string YYYY-MM-DD HH:MM:SS
Auto Trait Implementations§
impl Forget for Faker
impl Freeze for Faker
impl Move for Faker
impl RefUnwindSafe for Faker
impl Send for Faker
impl Sync for Faker
impl Unpin for Faker
impl UnsafeUnpin for Faker
impl UnwindSafe for Faker
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more