pub enum Sort {
EncodingSortField(EncodingSortField),
Enum(VgComparatorOrder),
UnionArray(Vec<SortElement>),
}Expand description
Sort order for the encoded field.
For continuous fields (quantitative or temporal), sort can be either "ascending" or
"descending".
For discrete fields, sort can be one of the following:
"ascending"or"descending"– for sorting by the values’ natural order in Javascript.- A sort field definition for sorting by another field.
- An array specifying the field values in preferred
order. In this case, the
sort order will obey the values in the array, followed by any unspecified values in their
original order. For discrete time field, values in the sort array can be date-time
definition objects. In addition, for time units
"month"and"day", the values can be the month or day names (case insensitive) or their 3-letter initials (e.g.,"Mon","Tue"). nullindicating no sort.
Default value: "ascending"
Note: null is not supported for row and column.
Variants§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Sort
impl<'de> Deserialize<'de> for Sort
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Sort
impl RefUnwindSafe for Sort
impl Send for Sort
impl Sync for Sort
impl Unpin for Sort
impl UnwindSafe for Sort
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