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 Freeze for Column
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