Struct couch_rs::types::query::QueryParams

source ·
pub struct QueryParams<K: Serialize + PartialEq + Debug + Clone> {
Show 22 fields pub conflicts: Option<bool>, pub descending: Option<bool>, pub end_key: Option<K>, pub end_key_doc_id: Option<String>, pub group: Option<bool>, pub group_level: Option<u32>, pub include_docs: Option<bool>, pub attachments: Option<bool>, pub att_encoding_info: Option<bool>, pub inclusive_end: Option<bool>, pub key: Option<K>, pub keys: Vec<K>, pub limit: Option<u64>, pub reduce: Option<bool>, pub skip: Option<u64>, pub sorted: Option<bool>, pub stable: Option<bool>, pub stale: Option<String>, pub start_key: Option<K>, pub start_key_doc_id: Option<String>, pub update: Option<UpdateView>, pub update_seq: Option<bool>,
}
Expand description

Query parameters. You can use the builder paradigm to construct these parameters easily: views.html

use couch_rs::types::query::QueryParams;
let _qp = QueryParams::default().group(true).conflicts(false).start_key("1".to_string());

Fields§

§conflicts: Option<bool>§descending: Option<bool>§end_key: Option<K>§end_key_doc_id: Option<String>§group: Option<bool>§group_level: Option<u32>§include_docs: Option<bool>§attachments: Option<bool>§att_encoding_info: Option<bool>§inclusive_end: Option<bool>§key: Option<K>§keys: Vec<K>§limit: Option<u64>§reduce: Option<bool>§skip: Option<u64>§sorted: Option<bool>§stable: Option<bool>§stale: Option<String>§start_key: Option<K>§start_key_doc_id: Option<String>§update: Option<UpdateView>§update_seq: Option<bool>

Implementations§

source§

impl<K: Serialize + DeserializeOwned + PartialEq + Debug + Clone> QueryParams<K>

source

pub fn from_keys(keys: Vec<K>) -> Self

source

pub fn conflicts(self, conflicts: bool) -> Self

source

pub fn descending(self, descending: bool) -> Self

source

pub fn end_key(self, end_key: K) -> Self

source

pub fn group(self, group: bool) -> Self

source

pub fn group_level(self, group_level: u32) -> Self

source

pub fn include_docs(self, include_docs: bool) -> Self

source

pub fn attachments(self, attachments: bool) -> Self

source

pub fn att_encoding_info(self, att_encoding_info: bool) -> Self

source

pub fn inclusive_end(self, inclusive_end: bool) -> Self

source

pub fn key(self, key: K) -> Self

source

pub fn keys(self, keys: Vec<K>) -> Self

source

pub fn limit(self, limit: u64) -> Self

source

pub fn reduce(self, reduce: bool) -> Self

source

pub fn skip(self, skip: u64) -> Self

source

pub fn sorted(self, sorted: bool) -> Self

source

pub fn stable(self, stable: bool) -> Self

source

pub fn start_key(self, start_key: K) -> Self

source

pub fn start_key_doc_id(self, start_key_doc_id: &str) -> Self

source

pub fn update(self, update: UpdateView) -> Self

source

pub fn update_seq(self, update_seq: bool) -> Self

Trait Implementations§

source§

impl<K: Clone + Serialize + PartialEq + Debug + Clone> Clone for QueryParams<K>

source§

fn clone(&self) -> QueryParams<K>

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<K: Debug + Serialize + PartialEq + Debug + Clone> Debug for QueryParams<K>

source§

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

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

impl<K: Serialize + DeserializeOwned + PartialEq + Debug + Clone> Default for QueryParams<K>

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<'de, K> Deserialize<'de> for QueryParams<K>
where K: Deserialize<'de> + Serialize + PartialEq + Debug + Clone,

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<K: PartialEq + Serialize + PartialEq + Debug + Clone> PartialEq for QueryParams<K>

source§

fn eq(&self, other: &QueryParams<K>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<K> Serialize for QueryParams<K>

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
source§

impl<K: Eq + Serialize + PartialEq + Debug + Clone> Eq for QueryParams<K>

source§

impl<K: Serialize + PartialEq + Debug + Clone> StructuralPartialEq for QueryParams<K>

Auto Trait Implementations§

§

impl<K> Freeze for QueryParams<K>
where K: Freeze,

§

impl<K> RefUnwindSafe for QueryParams<K>
where K: RefUnwindSafe,

§

impl<K> Send for QueryParams<K>
where K: Send,

§

impl<K> Sync for QueryParams<K>
where K: Sync,

§

impl<K> Unpin for QueryParams<K>
where K: Unpin,

§

impl<K> UnwindSafe for QueryParams<K>
where K: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where 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> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where 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 T
where 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 T
where 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 T
where 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> WithSubscriber for T

source§

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
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

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