pub struct Column {
pub name: String,
pub column_type: ValueType,
pub limiter: ValueLimiter,
}Expand description
Column of virtual data
Column is “text” type by default but can be further configured with value limiter.
Fields§
§name: String§column_type: ValueType§limiter: ValueLimiterImplementations§
source§impl Column
impl Column
sourcepub fn new(
name: &str,
column_type: ValueType,
limiter: Option<ValueLimiter>
) -> Self
pub fn new( name: &str, column_type: ValueType, limiter: Option<ValueLimiter> ) -> Self
Create new column with properties
sourcepub fn get_column_type(&self) -> &ValueType
pub fn get_column_type(&self) -> &ValueType
Get column type
sourcepub fn set_limiter(&mut self, limiter: ValueLimiter)
pub fn set_limiter(&mut self, limiter: ValueLimiter)
Apply limiter to a column
sourcepub fn get_default_value(&self) -> Value
pub fn get_default_value(&self) -> Value
Get default value by column
Every value type has it’s own default value. The default value can differ by limiter’s variant of patterns and should comply to a limter’s predicate.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Column
impl Send for Column
impl Sync for Column
impl Unpin for Column
impl UnwindSafe for Column
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