pub struct GetValueAtGenerator<T> { /* private fields */ }Expand description
The generator that gets a T value from the values with the value evaluated by script as the index of 0-index.
Trait Implementations§
Source§impl<R: Randomizer + ?Sized, T: ForGetValueAtGeneratorType> GeneratorBase<R> for GetValueAtGenerator<T>
impl<R: Randomizer + ?Sized, T: ForGetValueAtGeneratorType> GeneratorBase<R> for GetValueAtGenerator<T>
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<R: Randomizer + ?Sized, T: ForGetValueAtGeneratorType> ValueGeneratorBase<R, T> for GetValueAtGenerator<T>
impl<R: Randomizer + ?Sized, T: ForGetValueAtGeneratorType> ValueGeneratorBase<R, T> for GetValueAtGenerator<T>
Auto Trait Implementations§
impl<T> Freeze for GetValueAtGenerator<T>
impl<T> RefUnwindSafe for GetValueAtGenerator<T>where
T: RefUnwindSafe,
impl<T> Send for GetValueAtGenerator<T>where
T: Send,
impl<T> Sync for GetValueAtGenerator<T>where
T: Sync,
impl<T> Unpin for GetValueAtGenerator<T>where
T: Unpin,
impl<T> UnwindSafe for GetValueAtGenerator<T>where
T: 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
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