pub struct SortEncodingSortFieldBuilder { /* private fields */ }
Expand description
Builder for SortEncodingSortField
.
Implementations§
source§impl SortEncodingSortFieldBuilder
impl SortEncodingSortFieldBuilder
sourcepub fn field<VALUE: Into<Field>>(&mut self, value: VALUE) -> &mut Self
pub fn field<VALUE: Into<Field>>(&mut self, value: VALUE) -> &mut Self
The data field to sort by.
Default value: If unspecified, defaults to the field specified in the outer data reference.
sourcepub fn op<VALUE: Into<NonArgAggregateOp>>(&mut self, value: VALUE) -> &mut Self
pub fn op<VALUE: Into<NonArgAggregateOp>>(&mut self, value: VALUE) -> &mut Self
An aggregate operation to
perform on the field prior to sorting (e.g., "count"
, "mean"
and "median"
). An
aggregation is required when there are multiple values of the sort field for each encoded
data field. The input data objects will be aggregated, grouped by the encoded data
field.
For a full list of operations, please see the documentation for aggregate.
Default value: "sum"
for stacked plots. Otherwise, "min"
.
sourcepub fn order<VALUE: Into<RemovableValue<SortOrder>>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn order<VALUE: Into<RemovableValue<SortOrder>>>( &mut self, value: VALUE ) -> &mut Self
The sort order. One of "ascending"
(default), "descending"
, or null
(no not sort).
sourcepub fn build(
&self
) -> Result<SortEncodingSortField, SortEncodingSortFieldBuilderError>
pub fn build( &self ) -> Result<SortEncodingSortField, SortEncodingSortFieldBuilderError>
Trait Implementations§
source§impl Clone for SortEncodingSortFieldBuilder
impl Clone for SortEncodingSortFieldBuilder
source§fn clone(&self) -> SortEncodingSortFieldBuilder
fn clone(&self) -> SortEncodingSortFieldBuilder
Returns a copy 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 moreAuto Trait Implementations§
impl RefUnwindSafe for SortEncodingSortFieldBuilder
impl Send for SortEncodingSortFieldBuilder
impl Sync for SortEncodingSortFieldBuilder
impl Unpin for SortEncodingSortFieldBuilder
impl UnwindSafe for SortEncodingSortFieldBuilder
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