pub struct Faker { /* private fields */ }Expand description
A tiny deterministic generator for factories and seeders.
Deterministic on purpose: a seeded database that differs run to run makes a failing test impossible to reproduce.
Implementations§
Source§impl Faker
impl Faker
pub fn new(seed: u64) -> Self
pub fn number(&mut self, low: i64, high: i64) -> i64
pub fn boolean(&mut self) -> bool
pub fn pick<'a, T>(&mut self, options: &'a [T]) -> &'a T
pub fn name(&mut self) -> String
pub fn email(&mut self) -> String
pub fn sentence(&mut self) -> String
pub fn slug(&mut self) -> String
Auto Trait Implementations§
impl Freeze 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
Mutably borrows from an owned value. Read more