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§
Sourcefn should_stop(
&self,
end: Self,
step: &Self::StepType,
include_end: bool,
) -> bool
fn should_stop( &self, end: Self, step: &Self::StepType, include_end: bool, ) -> bool
Check if we’ve reached the end of the series
Sourcefn advance(&mut self, step: &Self::StepType) -> Result<()>
fn advance(&mut self, step: &Self::StepType) -> Result<()>
Advance to the next value in the series
Sourcefn create_array(&self, values: Vec<Self::ValueType>) -> Result<ArrayRef>
fn create_array(&self, values: Vec<Self::ValueType>) -> Result<ArrayRef>
Create an Arrow array from a vector of values
Sourcefn to_value_type(&self) -> Self::ValueType
fn to_value_type(&self) -> Self::ValueType
Convert self to ValueType for array creation
Sourcefn display_value(&self) -> String
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.