pub struct GenContext<'a> {
pub rng: Rng,
pub locales: &'a [&'a Locale],
pub modifier: &'a str,
pub identity: Option<&'a Identity>,
pub tz_offset_minutes: i32,
pub since: i64,
pub until: i64,
pub range: Option<(i64, i64)>,
pub ordering: Ordering,
pub zipf: Option<ZipfSpec>,
pub numeric: Option<f64>,
}Expand description
Generation context — replaces globals and rigid GenFn params.
Fields§
§rng: Rng§locales: &'a [&'a Locale]§modifier: &'a str§identity: Option<&'a Identity>§tz_offset_minutes: i32§since: i64§until: i64§range: Option<(i64, i64)>Per-field range override, resolved (both bounds filled).
ordering: OrderingMonotonic ordering: Asc/Desc use record number for position.
zipf: Option<ZipfSpec>Zipf distribution over the range. None = uniform.
numeric: Option<f64>Raw numeric value — set by numeric generators, read by aggregators.
Implementations§
Source§impl<'a> GenContext<'a>
impl<'a> GenContext<'a>
Auto Trait Implementations§
impl<'a> Freeze for GenContext<'a>
impl<'a> RefUnwindSafe for GenContext<'a>
impl<'a> Send for GenContext<'a>
impl<'a> Sync for GenContext<'a>
impl<'a> Unpin for GenContext<'a>
impl<'a> UnsafeUnpin for GenContext<'a>
impl<'a> UnwindSafe for GenContext<'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