Struct django_query::ordering::OrderingSet
source · [−]pub struct OrderingSet<R> { /* private fields */ }
Expand description
A collection of sort orders, built from a Sortable type.
Implementations
sourceimpl<R: Sortable + 'static> OrderingSet<R>
impl<R: Sortable + 'static> OrderingSet<R>
sourcepub fn new() -> Self
pub fn new() -> Self
Create a new OrderingSet for a Sortable type.
sourcepub fn create_sort(&self, expr: &str) -> Result<Box<dyn Sorter<R>>, SorterError>
pub fn create_sort(&self, expr: &str) -> Result<Box<dyn Sorter<R>>, SorterError>
Parse a sort expression and return a Sorter.
Valid sort expressions consist of a comma-separated list of sorts, each of
which may be optionally preceded by a -
to reverse its sense.
Trait Implementations
sourceimpl<R: Sortable + 'static> Default for OrderingSet<R>
impl<R: Sortable + 'static> Default for OrderingSet<R>
sourceimpl<R: Sortable> SortVisitor for OrderingSet<R>
impl<R: Sortable> SortVisitor for OrderingSet<R>
type Target = R
sourcefn visit_sort<F, T, S>(&mut self, name: &str, field: &F, sort: &S) where
F: Field<R, Value = T> + 'static,
S: SorterTypedClass<T> + 'static,
<S as SorterTypedClass<T>>::Sorter: 'static,
fn visit_sort<F, T, S>(&mut self, name: &str, field: &F, sort: &S) where
F: Field<R, Value = T> + 'static,
S: SorterTypedClass<T> + 'static,
<S as SorterTypedClass<T>>::Sorter: 'static,
Auto Trait Implementations
impl<R> !RefUnwindSafe for OrderingSet<R>
impl<R> !Send for OrderingSet<R>
impl<R> !Sync for OrderingSet<R>
impl<R> Unpin for OrderingSet<R>
impl<R> !UnwindSafe for OrderingSet<R>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more