pub enum TanStackValue {
Undefined,
Null,
Bool(bool),
Number(f64),
String(Arc<str>),
Array(Vec<TanStackValue>),
DateTime(f64),
}Expand description
A TanStack-like “cell value” representation used by built-in sorting functions.
This exists because TanStack Table’s built-in sorting functions operate over untyped JS
values (including undefined). In Rust, we need a stable representation to express those
behaviors.
Variants§
Undefined
Null
Bool(bool)
Number(f64)
String(Arc<str>)
Array(Vec<TanStackValue>)
DateTime(f64)
Stored as milliseconds since epoch (JS Date.valueOf()).
Trait Implementations§
Source§impl Clone for TanStackValue
impl Clone for TanStackValue
Source§fn clone(&self) -> TanStackValue
fn clone(&self) -> TanStackValue
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TanStackValue
impl Debug for TanStackValue
Source§impl From<&str> for TanStackValue
impl From<&str> for TanStackValue
Source§fn from(value: &str) -> TanStackValue
fn from(value: &str) -> TanStackValue
Converts to this type from the input type.
Source§impl From<String> for TanStackValue
impl From<String> for TanStackValue
Source§fn from(value: String) -> TanStackValue
fn from(value: String) -> TanStackValue
Converts to this type from the input type.
Source§impl From<Vec<TanStackValue>> for TanStackValue
impl From<Vec<TanStackValue>> for TanStackValue
Source§fn from(value: Vec<TanStackValue>) -> TanStackValue
fn from(value: Vec<TanStackValue>) -> TanStackValue
Converts to this type from the input type.
Source§impl From<bool> for TanStackValue
impl From<bool> for TanStackValue
Source§fn from(value: bool) -> TanStackValue
fn from(value: bool) -> TanStackValue
Converts to this type from the input type.
Source§impl From<f32> for TanStackValue
impl From<f32> for TanStackValue
Source§fn from(value: f32) -> TanStackValue
fn from(value: f32) -> TanStackValue
Converts to this type from the input type.
Source§impl From<f64> for TanStackValue
impl From<f64> for TanStackValue
Source§fn from(value: f64) -> TanStackValue
fn from(value: f64) -> TanStackValue
Converts to this type from the input type.
Source§impl From<i32> for TanStackValue
impl From<i32> for TanStackValue
Source§fn from(value: i32) -> TanStackValue
fn from(value: i32) -> TanStackValue
Converts to this type from the input type.
Source§impl From<i64> for TanStackValue
impl From<i64> for TanStackValue
Source§fn from(value: i64) -> TanStackValue
fn from(value: i64) -> TanStackValue
Converts to this type from the input type.
Source§impl From<u32> for TanStackValue
impl From<u32> for TanStackValue
Source§fn from(value: u32) -> TanStackValue
fn from(value: u32) -> TanStackValue
Converts to this type from the input type.
Source§impl From<u64> for TanStackValue
impl From<u64> for TanStackValue
Source§fn from(value: u64) -> TanStackValue
fn from(value: u64) -> TanStackValue
Converts to this type from the input type.
Source§impl From<usize> for TanStackValue
impl From<usize> for TanStackValue
Source§fn from(value: usize) -> TanStackValue
fn from(value: usize) -> TanStackValue
Converts to this type from the input type.
Source§impl PartialEq for TanStackValue
impl PartialEq for TanStackValue
impl StructuralPartialEq for TanStackValue
Auto Trait Implementations§
impl Freeze for TanStackValue
impl RefUnwindSafe for TanStackValue
impl Send for TanStackValue
impl Sync for TanStackValue
impl Unpin for TanStackValue
impl UnsafeUnpin for TanStackValue
impl UnwindSafe for TanStackValue
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