pub struct CustomerGenerator<'a> { /* private fields */ }Expand description
Generator for Customer table data
Implementations§
Source§impl<'a> CustomerGenerator<'a>
impl<'a> CustomerGenerator<'a>
Sourcepub fn new(
scale_factor: f64,
part: i32,
part_count: i32,
) -> CustomerGenerator<'static>
pub fn new( scale_factor: f64, part: i32, part_count: i32, ) -> CustomerGenerator<'static>
Creates a new CustomerGenerator with the given scale factor
Note the generator’s lifetime is &'static. See NationGenerator for
more details.
Sourcepub fn new_with_distributions_and_text_pool<'b>(
scale_factor: f64,
part: i32,
part_count: i32,
distributions: &'b Distributions,
text_pool: &'b TextPool,
) -> CustomerGenerator<'b>
pub fn new_with_distributions_and_text_pool<'b>( scale_factor: f64, part: i32, part_count: i32, distributions: &'b Distributions, text_pool: &'b TextPool, ) -> CustomerGenerator<'b>
Creates a CustomerGenerator with specified distributions and text pool
Sourcepub fn calculate_row_count(scale_factor: f64, part: i32, part_count: i32) -> i64
pub fn calculate_row_count(scale_factor: f64, part: i32, part_count: i32) -> i64
Return the row count for the given scale factor and generator part count
Sourcepub fn iter(&self) -> CustomerGeneratorIterator<'a> ⓘ
pub fn iter(&self) -> CustomerGeneratorIterator<'a> ⓘ
Returns an iterator over the customer rows
Trait Implementations§
Source§impl<'a> Clone for CustomerGenerator<'a>
impl<'a> Clone for CustomerGenerator<'a>
Source§fn clone(&self) -> CustomerGenerator<'a>
fn clone(&self) -> CustomerGenerator<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for CustomerGenerator<'a>
impl<'a> Debug for CustomerGenerator<'a>
Source§impl<'a> IntoIterator for CustomerGenerator<'a>
impl<'a> IntoIterator for CustomerGenerator<'a>
Auto Trait Implementations§
impl<'a> Freeze for CustomerGenerator<'a>
impl<'a> RefUnwindSafe for CustomerGenerator<'a>
impl<'a> Send for CustomerGenerator<'a>
impl<'a> Sync for CustomerGenerator<'a>
impl<'a> Unpin for CustomerGenerator<'a>
impl<'a> UnwindSafe for CustomerGenerator<'a>
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