pub struct GeneratorBuilder { /* private fields */ }Expand description
Base Generator Builder
Implementations§
Source§impl GeneratorBuilder
impl GeneratorBuilder
Sourcepub fn build<R: Randomizer + ?Sized>(
self,
) -> Result<Box<dyn GeneratorBase<R>>, BuildError>
pub fn build<R: Randomizer + ?Sized>( self, ) -> Result<Box<dyn GeneratorBase<R>>, BuildError>
Build generator as the type
Sourcepub fn into_parent<S>(self, key: S) -> ParentGeneratorBuilder
pub fn into_parent<S>(self, key: S) -> ParentGeneratorBuilder
Convert this builder to parent builder
Sourcepub fn into_child(self) -> ChildGeneratorBuilder
pub fn into_child(self) -> ChildGeneratorBuilder
Convert this builder to child
Source§impl GeneratorBuilder
impl GeneratorBuilder
Sourcepub fn new_duplicate_permutation<S>(
range: Option<ValueBound<SbrdInt>>,
separator: S,
children: Option<Vec<ChildGeneratorBuilder>>,
chars: Option<String>,
values: Option<Vec<DataValue>>,
filepath: Option<PathBuf>,
) -> Self
pub fn new_duplicate_permutation<S>( range: Option<ValueBound<SbrdInt>>, separator: S, children: Option<Vec<ChildGeneratorBuilder>>, chars: Option<String>, values: Option<Vec<DataValue>>, filepath: Option<PathBuf>, ) -> Self
Create builder for DuplicatePermutationGenerator as generator
Sourcepub fn new_format<S>(format: S) -> Self
pub fn new_format<S>(format: S) -> Self
Create builder for FormatGenerator
Sourcepub fn new_dist_normal(mean: SbrdReal, std_dev: SbrdReal) -> Self
pub fn new_dist_normal(mean: SbrdReal, std_dev: SbrdReal) -> Self
Create builder for NormalGenerator
Sourcepub fn new_eval_int<S>(script: S) -> Self
pub fn new_eval_int<S>(script: S) -> Self
Create builder for EvalGenerator with type SbrdInt
Sourcepub fn new_eval_real<S>(script: S) -> Self
pub fn new_eval_real<S>(script: S) -> Self
Create builder for EvalGenerator with type SbrdReal
Sourcepub fn new_eval_bool<S>(script: S) -> Self
pub fn new_eval_bool<S>(script: S) -> Self
Create builder for EvalGenerator with type SbrdBool
Sourcepub fn new_eval_string<S>(script: S) -> Self
pub fn new_eval_string<S>(script: S) -> Self
Create builder for EvalGenerator with type SbrdString
Sourcepub fn new_increment_id(increment: Option<ValueStep<SbrdInt>>) -> Self
pub fn new_increment_id(increment: Option<ValueStep<SbrdInt>>) -> Self
Create builder for IncrementIdGenerator
Sourcepub fn new_int(range: Option<ValueBound<SbrdInt>>) -> Self
pub fn new_int(range: Option<ValueBound<SbrdInt>>) -> Self
Create builder for IntGenerator
Sourcepub fn new_real(range: Option<ValueBound<SbrdReal>>) -> Self
pub fn new_real(range: Option<ValueBound<SbrdReal>>) -> Self
Create builder for RealGenerator
Sourcepub fn new_bool() -> Self
pub fn new_bool() -> Self
Create builder for BoolGenerator
Sourcepub fn new_date_time(
range: Option<ValueBound<SbrdDateTime>>,
format: Option<String>,
) -> Self
pub fn new_date_time( range: Option<ValueBound<SbrdDateTime>>, format: Option<String>, ) -> Self
Create builder for DateTimeGenerator.
See format::strftime module for more information on format option.
The default for format and the format when parsing is DATE_TIME_DEFAULT_FORMAT.
Sourcepub fn new_date(
range: Option<ValueBound<SbrdDate>>,
format: Option<String>,
) -> Self
pub fn new_date( range: Option<ValueBound<SbrdDate>>, format: Option<String>, ) -> Self
Create builder for DateGenerator
See format::strftime module for more information on format option.
The default for format and the format when parsing is DATE_DEFAULT_FORMAT.
Sourcepub fn new_time(
range: Option<ValueBound<SbrdTime>>,
format: Option<String>,
) -> Self
pub fn new_time( range: Option<ValueBound<SbrdTime>>, format: Option<String>, ) -> Self
Create builder for TimeGenerator
See format::strftime module for more information on format option.
The default for format and the format when parsing is TIME_DEFAULT_FORMAT.
Sourcepub fn new_always_null() -> Self
pub fn new_always_null() -> Self
Create builder for AlwaysNullGenerator
Sourcepub fn new_case_when(children: Vec<ChildGeneratorBuilder>) -> Self
pub fn new_case_when(children: Vec<ChildGeneratorBuilder>) -> Self
Create builder for CaseWhenGenerator as generator with generate from children
Sourcepub fn new_random_child(children: Vec<ChildGeneratorBuilder>) -> Self
pub fn new_random_child(children: Vec<ChildGeneratorBuilder>) -> Self
Create builder for RandomChildGenerator as generator with generate from children
Sourcepub fn new_select_int(
chars: Option<String>,
values: Option<Vec<SbrdInt>>,
filepath: Option<PathBuf>,
) -> Self
pub fn new_select_int( chars: Option<String>, values: Option<Vec<SbrdInt>>, filepath: Option<PathBuf>, ) -> Self
Create builder for SelectGenerator with type SbrdInt
Sourcepub fn new_select_real(
chars: Option<String>,
values: Option<Vec<SbrdReal>>,
filepath: Option<PathBuf>,
) -> Self
pub fn new_select_real( chars: Option<String>, values: Option<Vec<SbrdReal>>, filepath: Option<PathBuf>, ) -> Self
Create builder for SelectGenerator with type SbrdReal
Sourcepub fn new_select_string(
chars: Option<String>,
values: Option<Vec<SbrdString>>,
filepath: Option<PathBuf>,
) -> Self
pub fn new_select_string( chars: Option<String>, values: Option<Vec<SbrdString>>, filepath: Option<PathBuf>, ) -> Self
Create builder for SelectGenerator with type SbrdString
Sourcepub fn new_get_int_value_at<S>(
script: S,
chars: Option<String>,
values: Option<Vec<SbrdInt>>,
filepath: Option<PathBuf>,
) -> Self
pub fn new_get_int_value_at<S>( script: S, chars: Option<String>, values: Option<Vec<SbrdInt>>, filepath: Option<PathBuf>, ) -> Self
Create builder for GetValueAtGenerator with type SbrdInt
Sourcepub fn new_get_real_value_at<S>(
script: S,
chars: Option<String>,
values: Option<Vec<SbrdReal>>,
filepath: Option<PathBuf>,
) -> Self
pub fn new_get_real_value_at<S>( script: S, chars: Option<String>, values: Option<Vec<SbrdReal>>, filepath: Option<PathBuf>, ) -> Self
Create builder for GetValueAtGenerator with type SbrdReal
Sourcepub fn new_get_string_value_at<S>(
script: S,
chars: Option<String>,
values: Option<Vec<SbrdString>>,
filepath: Option<PathBuf>,
) -> Self
pub fn new_get_string_value_at<S>( script: S, chars: Option<String>, values: Option<Vec<SbrdString>>, filepath: Option<PathBuf>, ) -> Self
Create builder for GetValueAtGenerator with type SbrdString
Sourcepub fn new_get_value_index(
chars: Option<String>,
values: Option<Vec<DataValue>>,
filepath: Option<PathBuf>,
) -> Self
pub fn new_get_value_index( chars: Option<String>, values: Option<Vec<DataValue>>, filepath: Option<PathBuf>, ) -> Self
Create builder for GetValueIndexGenerator
Trait Implementations§
Source§impl Clone for GeneratorBuilder
impl Clone for GeneratorBuilder
Source§fn clone(&self) -> GeneratorBuilder
fn clone(&self) -> GeneratorBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GeneratorBuilder
impl Debug for GeneratorBuilder
Source§impl<'de> Deserialize<'de> for GeneratorBuilder
impl<'de> Deserialize<'de> for GeneratorBuilder
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for GeneratorBuilder
impl PartialEq for GeneratorBuilder
Source§impl Serialize for GeneratorBuilder
impl Serialize for GeneratorBuilder
impl StructuralPartialEq for GeneratorBuilder
Auto Trait Implementations§
impl Freeze for GeneratorBuilder
impl RefUnwindSafe for GeneratorBuilder
impl Send for GeneratorBuilder
impl Sync for GeneratorBuilder
impl Unpin for GeneratorBuilder
impl UnwindSafe for GeneratorBuilder
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
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> ⓘ
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> ⓘ
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