[][src]Struct rabbithole::query::Query

pub struct Query {
    pub include: Option<IncludeQuery>,
    pub fields: FieldsQuery,
    pub sort: SortQuery,
    pub page: Option<PageQuery>,
    pub filter: Option<FilterQuery>,
}

Fields

include: Option<IncludeQuery>

When include is:

  1. None: all included fields will be added
  2. Some(<empty-query>): no included field will be added
  3. Some(<some-query>):
  4. No query matches the existing fields: like branch 2
  5. Otherwise: all matched fields will be added
fields: FieldsQuery

If ty is marked in fields map:

  1. If fields[<ty>] is not empty: all resources of this type will remove the attributes and relationships which are not in fields[<ty>]
  2. If fields[<ty>] is empty: all the fields of the resources with this type will be removed Else: retain all fields
sort: SortQuery

When sort is:

  1. empty: no sorting at all, clients should not expect the order of the result
  2. some values, but none of the values matches: like branch 1
  3. some values, and some of the items matches: sorting result with the order of the matched sort-query item
page: Option<PageQuery>filter: Option<FilterQuery>

Methods

impl Query[src]

pub fn from_uri(uri: &Uri) -> RbhResult<Query>[src]

Trait Implementations

impl Default for Query[src]

impl Debug for Query[src]

Auto Trait Implementations

impl Send for Query

impl Sync for Query

impl Unpin for Query

impl UnwindSafe for Query

impl RefUnwindSafe for Query

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,