pub struct VehicleGenerator<'a> { /* private fields */ }Expand description
Generator for Vehicle table data
Implementations§
Source§impl<'a> VehicleGenerator<'a>
impl<'a> VehicleGenerator<'a>
Sourcepub fn new(
scale_factor: f64,
part: i32,
part_count: i32,
) -> VehicleGenerator<'static>
pub fn new( scale_factor: f64, part: i32, part_count: i32, ) -> VehicleGenerator<'static>
Creates a new VehicleGenerator with the given scale factor
Note the generator’s lifetime is &'static. See VehicleGenerator 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,
) -> VehicleGenerator<'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, ) -> VehicleGenerator<'b>
Creates a VehicleGenerator 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) -> VehicleGeneratorIterator<'a> ⓘ
pub fn iter(&self) -> VehicleGeneratorIterator<'a> ⓘ
Returns an iterator over the part rows
Trait Implementations§
Source§impl<'a> Clone for VehicleGenerator<'a>
impl<'a> Clone for VehicleGenerator<'a>
Source§fn clone(&self) -> VehicleGenerator<'a>
fn clone(&self) -> VehicleGenerator<'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 VehicleGenerator<'a>
impl<'a> Debug for VehicleGenerator<'a>
Source§impl<'a> IntoIterator for VehicleGenerator<'a>
impl<'a> IntoIterator for VehicleGenerator<'a>
Auto Trait Implementations§
impl<'a> Freeze for VehicleGenerator<'a>
impl<'a> RefUnwindSafe for VehicleGenerator<'a>
impl<'a> Send for VehicleGenerator<'a>
impl<'a> Sync for VehicleGenerator<'a>
impl<'a> Unpin for VehicleGenerator<'a>
impl<'a> UnsafeUnpin for VehicleGenerator<'a>
impl<'a> UnwindSafe for VehicleGenerator<'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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more