pub struct TimeGenerator { /* private fields */ }Expand description
The generator with generate SbrdTime value as DataValue::String with the format
See format::strftime module for more information on format option.
The default for format and the format when parsing is TIME_DEFAULT_FORMAT.
Trait Implementations§
Source§impl Clone for TimeGenerator
impl Clone for TimeGenerator
Source§fn clone(&self) -> TimeGenerator
fn clone(&self) -> TimeGenerator
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 Debug for TimeGenerator
impl Debug for TimeGenerator
Source§impl<R: Randomizer + ?Sized> GeneratorBase<R> for TimeGenerator
impl<R: Randomizer + ?Sized> GeneratorBase<R> for TimeGenerator
Source§fn create(builder: GeneratorBuilder) -> Result<Self, BuildError>where
Self: Sized,
fn create(builder: GeneratorBuilder) -> Result<Self, BuildError>where
Self: Sized,
Create generator from builder
Source§fn is_nullable(&self) -> bool
fn is_nullable(&self) -> bool
Can generate null flag
Source§fn generate_without_null(
&self,
rng: &mut R,
context: &DataValueMap<&str>,
) -> Result<DataValue, GenerateError>
fn generate_without_null( &self, rng: &mut R, context: &DataValueMap<&str>, ) -> Result<DataValue, GenerateError>
Generate dummy data not considering nullable
Source§fn is_required(&self) -> bool
fn is_required(&self) -> bool
Cannot generate null flag
Source§fn generate(
&self,
rng: &mut R,
context: &DataValueMap<&str>,
) -> Result<DataValue, GenerateError>
fn generate( &self, rng: &mut R, context: &DataValueMap<&str>, ) -> Result<DataValue, GenerateError>
Generate dummy data considering nullable
Source§impl PartialEq for TimeGenerator
impl PartialEq for TimeGenerator
impl StructuralPartialEq for TimeGenerator
Auto Trait Implementations§
impl Freeze for TimeGenerator
impl RefUnwindSafe for TimeGenerator
impl Send for TimeGenerator
impl Sync for TimeGenerator
impl Unpin for TimeGenerator
impl UnwindSafe for TimeGenerator
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