pub struct NationGenerator<'a> { /* private fields */ }Expand description
Generator for Nation table data
Implementations§
Source§impl<'a> NationGenerator<'a>
impl<'a> NationGenerator<'a>
Sourcepub fn new(
_scale_factor: f64,
_part: i32,
_part_count: i32,
) -> NationGenerator<'static>
pub fn new( _scale_factor: f64, _part: i32, _part_count: i32, ) -> NationGenerator<'static>
Creates a new NationGenerator with default distributions and text pool
Nations 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 NationGenerator::default to create a
default generator.
The generator’s lifetime is &'static because it references global
[Distribution]s and thus can be shared safely between threads.
Sourcepub fn new_with_distributions_and_text_pool<'b>(
distributions: &'b Distributions,
text_pool: &'b TextPool,
) -> NationGenerator<'b>
pub fn new_with_distributions_and_text_pool<'b>( distributions: &'b Distributions, text_pool: &'b TextPool, ) -> NationGenerator<'b>
Creates a NationGenerator with the specified distributions and text pool
Sourcepub fn iter(&self) -> NationGeneratorIterator<'a> ⓘ
pub fn iter(&self) -> NationGeneratorIterator<'a> ⓘ
Returns an iterator over the nation rows
Trait Implementations§
Source§impl<'a> Clone for NationGenerator<'a>
impl<'a> Clone for NationGenerator<'a>
Source§fn clone(&self) -> NationGenerator<'a>
fn clone(&self) -> NationGenerator<'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 NationGenerator<'a>
impl<'a> Debug for NationGenerator<'a>
Source§impl Default for NationGenerator<'_>
impl Default for NationGenerator<'_>
Source§impl<'a> IntoIterator for NationGenerator<'a>
impl<'a> IntoIterator for NationGenerator<'a>
Auto Trait Implementations§
impl<'a> Freeze for NationGenerator<'a>
impl<'a> RefUnwindSafe for NationGenerator<'a>
impl<'a> Send for NationGenerator<'a>
impl<'a> Sync for NationGenerator<'a>
impl<'a> Unpin for NationGenerator<'a>
impl<'a> UnwindSafe for NationGenerator<'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