pub struct DateTimeGenerator<G = FixedOffsetGenerator, Tz: TimeZone = FixedOffset> { /* private fields */ }Available on crate feature
chrono only.Expand description
Generator for chrono::DateTime values. Created by datetimes().
Implementations§
Source§impl<G, Tz: TimeZone> DateTimeGenerator<G, Tz>
impl<G, Tz: TimeZone> DateTimeGenerator<G, Tz>
Sourcepub fn min_value(self, min: NaiveDateTime) -> Self
pub fn min_value(self, min: NaiveDateTime) -> Self
Set the minimum wall-clock datetime (inclusive).
Sourcepub fn max_value(self, max: NaiveDateTime) -> Self
pub fn max_value(self, max: NaiveDateTime) -> Self
Set the maximum wall-clock datetime (inclusive).
Sourcepub fn timezones<G2, Tz2>(self, tz_gen: G2) -> DateTimeGenerator<G2, Tz2>
pub fn timezones<G2, Tz2>(self, tz_gen: G2) -> DateTimeGenerator<G2, Tz2>
Use the specified timezone generator.
The returned generator has output type DateTime<Tz2> where Tz2
is the timezone type produced by tz_gen. Wall-clock bounds are
timezone-agnostic and carry across.
Trait Implementations§
Source§impl<G, Tz> Generator<DateTime<Tz>> for DateTimeGenerator<G, Tz>
impl<G, Tz> Generator<DateTime<Tz>> for DateTimeGenerator<G, Tz>
Source§fn map<U, F>(self, f: F) -> Mapped<T, U, F, Self>
fn map<U, F>(self, f: F) -> Mapped<T, U, F, Self>
Transform generated values using a function. Read more
Source§fn flat_map<U, G, F>(self, f: F) -> FlatMapped<T, U, G, F, Self>
fn flat_map<U, G, F>(self, f: F) -> FlatMapped<T, U, G, F, Self>
Generate a value, then use it to choose or configure another generator. Read more
Auto Trait Implementations§
impl<G, Tz> Freeze for DateTimeGenerator<G, Tz>where
G: Freeze,
impl<G, Tz> RefUnwindSafe for DateTimeGenerator<G, Tz>where
G: RefUnwindSafe,
impl<G, Tz> Send for DateTimeGenerator<G, Tz>where
G: Send,
impl<G, Tz> Sync for DateTimeGenerator<G, Tz>where
G: Sync,
impl<G, Tz> Unpin for DateTimeGenerator<G, Tz>where
G: Unpin,
impl<G, Tz> UnsafeUnpin for DateTimeGenerator<G, Tz>where
G: UnsafeUnpin,
impl<G, Tz> UnwindSafe for DateTimeGenerator<G, Tz>where
G: UnwindSafe,
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