GeneratorBuilder

Struct GeneratorBuilder 

Source
pub struct GeneratorBuilder { /* private fields */ }
Expand description

Base Generator Builder

Implementations§

Source§

impl GeneratorBuilder

Source

pub fn build<R: Randomizer + ?Sized>( self, ) -> Result<Box<dyn GeneratorBase<R>>, BuildError>

Build generator as the type

Source

pub fn into_parent<S>(self, key: S) -> ParentGeneratorBuilder
where S: Into<String>,

Convert this builder to parent builder

Source

pub fn into_child(self) -> ChildGeneratorBuilder

Convert this builder to child

Source§

impl GeneratorBuilder

Source

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
where S: Into<String>,

Create builder for DuplicatePermutationGenerator as generator

Source

pub fn new_format<S>(format: S) -> Self
where S: Into<String>,

Create builder for FormatGenerator

Source

pub fn new_dist_normal(mean: SbrdReal, std_dev: SbrdReal) -> Self

Create builder for NormalGenerator

Source

pub fn new_eval_int<S>(script: S) -> Self
where S: Into<String>,

Create builder for EvalGenerator with type SbrdInt

Source

pub fn new_eval_real<S>(script: S) -> Self
where S: Into<String>,

Create builder for EvalGenerator with type SbrdReal

Source

pub fn new_eval_bool<S>(script: S) -> Self
where S: Into<String>,

Create builder for EvalGenerator with type SbrdBool

Source

pub fn new_eval_string<S>(script: S) -> Self
where S: Into<String>,

Create builder for EvalGenerator with type SbrdString

Source

pub fn new_increment_id(increment: Option<ValueStep<SbrdInt>>) -> Self

Create builder for IncrementIdGenerator

Source

pub fn new_int(range: Option<ValueBound<SbrdInt>>) -> Self

Create builder for IntGenerator

Source

pub fn new_real(range: Option<ValueBound<SbrdReal>>) -> Self

Create builder for RealGenerator

Source

pub fn new_bool() -> Self

Create builder for BoolGenerator

Source

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.

Source

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.

Source

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.

Source

pub fn new_always_null() -> Self

Create builder for AlwaysNullGenerator

Source

pub fn new_case_when(children: Vec<ChildGeneratorBuilder>) -> Self

Create builder for CaseWhenGenerator as generator with generate from children

Source

pub fn new_random_child(children: Vec<ChildGeneratorBuilder>) -> Self

Create builder for RandomChildGenerator as generator with generate from children

Source

pub fn new_select_int( chars: Option<String>, values: Option<Vec<SbrdInt>>, filepath: Option<PathBuf>, ) -> Self

Create builder for SelectGenerator with type SbrdInt

Source

pub fn new_select_real( chars: Option<String>, values: Option<Vec<SbrdReal>>, filepath: Option<PathBuf>, ) -> Self

Create builder for SelectGenerator with type SbrdReal

Source

pub fn new_select_string( chars: Option<String>, values: Option<Vec<SbrdString>>, filepath: Option<PathBuf>, ) -> Self

Create builder for SelectGenerator with type SbrdString

Source

pub fn new_get_int_value_at<S>( script: S, chars: Option<String>, values: Option<Vec<SbrdInt>>, filepath: Option<PathBuf>, ) -> Self
where S: Into<String>,

Create builder for GetValueAtGenerator with type SbrdInt

Source

pub fn new_get_real_value_at<S>( script: S, chars: Option<String>, values: Option<Vec<SbrdReal>>, filepath: Option<PathBuf>, ) -> Self
where S: Into<String>,

Create builder for GetValueAtGenerator with type SbrdReal

Source

pub fn new_get_string_value_at<S>( script: S, chars: Option<String>, values: Option<Vec<SbrdString>>, filepath: Option<PathBuf>, ) -> Self
where S: Into<String>,

Create builder for GetValueAtGenerator with type SbrdString

Source

pub fn new_get_value_index( chars: Option<String>, values: Option<Vec<DataValue>>, filepath: Option<PathBuf>, ) -> Self

Create builder for GetValueIndexGenerator

Source§

impl GeneratorBuilder

Source

pub fn nullable(self) -> Self

Set nullable status to change to nullable

Trait Implementations§

Source§

impl Clone for GeneratorBuilder

Source§

fn clone(&self) -> GeneratorBuilder

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for GeneratorBuilder

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for GeneratorBuilder

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for GeneratorBuilder

Source§

fn eq(&self, other: &GeneratorBuilder) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for GeneratorBuilder

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for GeneratorBuilder

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,