pub enum SortUnion {
    EncodingSortField(EncodingSortField),
    Enum(Sort),
    UnionArray(Vec<SelectionInitInterval>),
}
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 string indicating an encoding channel name to sort by (e.g., "x" or "y") with an optional minus prefix for descending sort (e.g., "-x" to sort by x-field, descending). This channel string is short-form of a sort-by-encoding definition. For example, "sort": "-x" is equivalent to "sort": {"encoding": "x", "order": "descending"}. - 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"). - null indicating no sort.

Default value: "ascending"

Note: null and sorting by another channel is not supported for row and column.

See also: sort documentation.

Variants§

§

EncodingSortField(EncodingSortField)

§

Enum(Sort)

§

UnionArray(Vec<SelectionInitInterval>)

Trait Implementations§

source§

impl Clone for SortUnion

source§

fn clone(&self) -> SortUnion

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SortUnion

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for SortUnion

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<[&str; 1]> for SortUnion

source§

fn from(v: [&str; 1]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 10]> for SortUnion

source§

fn from(v: [&str; 10]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 11]> for SortUnion

source§

fn from(v: [&str; 11]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 12]> for SortUnion

source§

fn from(v: [&str; 12]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 13]> for SortUnion

source§

fn from(v: [&str; 13]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 14]> for SortUnion

source§

fn from(v: [&str; 14]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 15]> for SortUnion

source§

fn from(v: [&str; 15]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 16]> for SortUnion

source§

fn from(v: [&str; 16]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 17]> for SortUnion

source§

fn from(v: [&str; 17]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 18]> for SortUnion

source§

fn from(v: [&str; 18]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 19]> for SortUnion

source§

fn from(v: [&str; 19]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 2]> for SortUnion

source§

fn from(v: [&str; 2]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 20]> for SortUnion

source§

fn from(v: [&str; 20]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 21]> for SortUnion

source§

fn from(v: [&str; 21]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 22]> for SortUnion

source§

fn from(v: [&str; 22]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 23]> for SortUnion

source§

fn from(v: [&str; 23]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 24]> for SortUnion

source§

fn from(v: [&str; 24]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 25]> for SortUnion

source§

fn from(v: [&str; 25]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 26]> for SortUnion

source§

fn from(v: [&str; 26]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 27]> for SortUnion

source§

fn from(v: [&str; 27]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 28]> for SortUnion

source§

fn from(v: [&str; 28]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 29]> for SortUnion

source§

fn from(v: [&str; 29]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 3]> for SortUnion

source§

fn from(v: [&str; 3]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 30]> for SortUnion

source§

fn from(v: [&str; 30]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 31]> for SortUnion

source§

fn from(v: [&str; 31]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 32]> for SortUnion

source§

fn from(v: [&str; 32]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 4]> for SortUnion

source§

fn from(v: [&str; 4]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 5]> for SortUnion

source§

fn from(v: [&str; 5]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 6]> for SortUnion

source§

fn from(v: [&str; 6]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 7]> for SortUnion

source§

fn from(v: [&str; 7]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 8]> for SortUnion

source§

fn from(v: [&str; 8]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 9]> for SortUnion

source§

fn from(v: [&str; 9]) -> Self

Converts to this type from the input type.
source§

impl From<EncodingSortField> for SortUnion

source§

fn from(original: EncodingSortField) -> SortUnion

Converts to this type from the input type.
source§

impl From<Sort> for SortUnion

source§

fn from(original: Sort) -> SortUnion

Converts to this type from the input type.
source§

impl From<Vec<&str, Global>> for SortUnion

source§

fn from(v: Vec<&str>) -> Self

Converts to this type from the input type.
source§

impl From<Vec<SelectionInitInterval, Global>> for SortUnion

source§

fn from(original: Vec<SelectionInitInterval>) -> SortUnion

Converts to this type from the input type.
source§

impl From<Vec<String, Global>> for SortUnion

source§

fn from(v: Vec<String>) -> Self

Converts to this type from the input type.
source§

impl Serialize for SortUnion

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,