pub struct RegionGenerator<'a> { /* private fields */ }Expand description
Generator for Region table data
Implementations§
Source§impl<'a> RegionGenerator<'a>
impl<'a> RegionGenerator<'a>
Sourcepub fn new(
_scale_factor: f64,
_part: i32,
_part_count: i32,
) -> RegionGenerator<'static>
pub fn new( _scale_factor: f64, _part: i32, _part_count: i32, ) -> RegionGenerator<'static>
Creates a new RegionGenerator with default distributions and text pool
Regions does not depend on the scale factor or the part number. The signature of
this method is provided to be consistent with the other generators, but the
parameters are ignored. You can use RegionGenerator::default to create a
default generator.
Note the generator’s lifetime is &'static. See NationGenerator for
more details.
Sourcepub fn new_with_distributions_and_text_pool<'b>(
distributions: &'b Distributions,
text_pool: &'b TextPool,
) -> RegionGenerator<'b>
pub fn new_with_distributions_and_text_pool<'b>( distributions: &'b Distributions, text_pool: &'b TextPool, ) -> RegionGenerator<'b>
Creates a RegionGenerator with the specified distributions and text pool
Sourcepub fn iter(&self) -> RegionGeneratorIterator<'a> ⓘ
pub fn iter(&self) -> RegionGeneratorIterator<'a> ⓘ
Returns an iterator over the region rows
Trait Implementations§
Source§impl<'a> Clone for RegionGenerator<'a>
impl<'a> Clone for RegionGenerator<'a>
Source§fn clone(&self) -> RegionGenerator<'a>
fn clone(&self) -> RegionGenerator<'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 RegionGenerator<'a>
impl<'a> Debug for RegionGenerator<'a>
Source§impl Default for RegionGenerator<'_>
impl Default for RegionGenerator<'_>
Source§impl<'a> IntoIterator for RegionGenerator<'a>
impl<'a> IntoIterator for RegionGenerator<'a>
Auto Trait Implementations§
impl<'a> Freeze for RegionGenerator<'a>
impl<'a> RefUnwindSafe for RegionGenerator<'a>
impl<'a> Send for RegionGenerator<'a>
impl<'a> Sync for RegionGenerator<'a>
impl<'a> Unpin for RegionGenerator<'a>
impl<'a> UnwindSafe for RegionGenerator<'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