pub trait DataTableDynValue:
Display
+ Send
+ Sync {
// Required methods
fn compare(&self, other: &dyn DataTableDynValue) -> Ordering;
fn clone_box(&self) -> Box<dyn DataTableDynValue>;
fn as_any(&self) -> &(dyn Any + 'static);
// Provided methods
fn as_string(&self) -> String { ... }
fn contains_str(&self, needle: &str) -> bool { ... }
fn as_f64(&self) -> Option<f64> { ... }
}Expand description
Trait for dynamically typed values that support comparison and display.
Implementations are provided for common Rust types including
String, &'static str, i32, i64, f64, bool, and usize.
Required Methods§
Sourcefn compare(&self, other: &dyn DataTableDynValue) -> Ordering
fn compare(&self, other: &dyn DataTableDynValue) -> Ordering
Sourcefn clone_box(&self) -> Box<dyn DataTableDynValue>
fn clone_box(&self) -> Box<dyn DataTableDynValue>
Provided Methods§
Sourcefn contains_str(&self, needle: &str) -> bool
fn contains_str(&self, needle: &str) -> bool
Implementations on Foreign Types§
Source§impl DataTableDynValue for &'static str
Implements DataTableDynValue for static string slices.
impl DataTableDynValue for &'static str
Implements DataTableDynValue for static string slices.
Source§impl DataTableDynValue for bool
Implements DataTableDynValue for bool with downcast-optimized comparison.
impl DataTableDynValue for bool
Implements DataTableDynValue for bool with downcast-optimized comparison.
Source§impl DataTableDynValue for f64
Implements DataTableDynValue for f64 with floating-point comparison.
impl DataTableDynValue for f64
Implements DataTableDynValue for f64 with floating-point comparison.
Source§impl DataTableDynValue for i32
Implements DataTableDynValue for i32 with numeric comparison support.
impl DataTableDynValue for i32
Implements DataTableDynValue for i32 with numeric comparison support.
Source§impl DataTableDynValue for i64
Implements DataTableDynValue for i64 with numeric comparison support.
impl DataTableDynValue for i64
Implements DataTableDynValue for i64 with numeric comparison support.
Source§impl DataTableDynValue for usize
Implements DataTableDynValue for usize with numeric comparison support.
impl DataTableDynValue for usize
Implements DataTableDynValue for usize with numeric comparison support.
Source§impl DataTableDynValue for String
Implements DataTableDynValue for String with downcast-optimized comparison.
impl DataTableDynValue for String
Implements DataTableDynValue for String with downcast-optimized comparison.