Struct fake::StringFaker
source · pub struct StringFaker<L> { /* private fields */ }
Expand description
Custom fake String
generator.
Examples
use fake::{Fake, StringFaker};
use fake::faker::name::en::Name;
// weak password generator
const ASCII: &str = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!\"#$%&\'()*+,-./:;<=>?@";
let f = StringFaker::with(Vec::from(ASCII), 8..12);
let a: String = f.fake();
Implementations§
Trait Implementations§
source§impl<L> Dummy<StringFaker<L>> for String
impl<L> Dummy<StringFaker<L>> for String
Auto Trait Implementations§
impl<L> RefUnwindSafe for StringFaker<L>where
L: RefUnwindSafe,
impl<L> Send for StringFaker<L>where
L: Send,
impl<L> Sync for StringFaker<L>where
L: Sync,
impl<L> Unpin for StringFaker<L>where
L: Unpin,
impl<L> UnwindSafe for StringFaker<L>where
L: UnwindSafe,
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