arrow::util::data_gen

Trait RandomTemporalValue

Source
pub trait RandomTemporalValue: ArrowTemporalType {
    // Required method
    fn value_range() -> impl SampleRange<Self::Native>;

    // Provided methods
    fn gen_range<R: Rng>(rng: &mut R) -> Self::Native
       where Self::Native: SampleUniform { ... }
    fn random<R: Rng>(rng: &mut R) -> Self::Native
       where Self::Native: SampleUniform { ... }
}
Expand description

Useful for testing. The range of values are not likely to be representative of the actual bounds.

Required Methods§

Source

fn value_range() -> impl SampleRange<Self::Native>

Returns the range of values for impl’d type

Provided Methods§

Source

fn gen_range<R: Rng>(rng: &mut R) -> Self::Native
where Self::Native: SampleUniform,

Generate a random value within the range of the type

Source

fn random<R: Rng>(rng: &mut R) -> Self::Native
where Self::Native: SampleUniform,

Generate a random value of the type

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§