SeriesValue

Trait SeriesValue 

Source
pub trait SeriesValue:
    Debug
    + Clone
    + Send
    + Sync
    + 'static {
    type StepType: Debug + Clone + Send + Sync;
    type ValueType: Debug + Clone + Send + Sync;

    // Required methods
    fn should_stop(
        &self,
        end: Self,
        step: &Self::StepType,
        include_end: bool,
    ) -> bool;
    fn advance(&mut self, step: &Self::StepType) -> Result<()>;
    fn create_array(&self, values: Vec<Self::ValueType>) -> Result<ArrayRef>;
    fn to_value_type(&self) -> Self::ValueType;
    fn display_value(&self) -> String;
}
Expand description

Trait for values that can be generated in a series

Required Associated Types§

Required Methods§

Source

fn should_stop( &self, end: Self, step: &Self::StepType, include_end: bool, ) -> bool

Check if we’ve reached the end of the series

Source

fn advance(&mut self, step: &Self::StepType) -> Result<()>

Advance to the next value in the series

Source

fn create_array(&self, values: Vec<Self::ValueType>) -> Result<ArrayRef>

Create an Arrow array from a vector of values

Source

fn to_value_type(&self) -> Self::ValueType

Convert self to ValueType for array creation

Source

fn display_value(&self) -> String

Display the value for debugging

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.

Implementations on Foreign Types§

Source§

impl SeriesValue for i64

Source§

type StepType = i64

Source§

type ValueType = i64

Source§

fn should_stop( &self, end: Self, step: &Self::StepType, include_end: bool, ) -> bool

Source§

fn advance(&mut self, step: &Self::StepType) -> Result<()>

Source§

fn create_array(&self, values: Vec<Self::ValueType>) -> Result<ArrayRef>

Source§

fn to_value_type(&self) -> Self::ValueType

Source§

fn display_value(&self) -> String

Implementors§