[][src]Struct couch_rs::types::view::CouchFunc

pub struct CouchFunc {
    pub map: String,
    pub reduce: Option<String>,
}

Constructs a CouchDB View Function. See defining-a-view for details.

use couch_rs::types::view::CouchFunc;
let couch_func = CouchFunc {
    map: "function (doc) { if (doc.CLIP == true) { emit(doc.CLIP); } }".to_string(),
    reduce: None,
};

Fields

map: Stringreduce: Option<String>

Implementations

impl CouchFunc[src]

pub fn new(map: &str, reduce: Option<&str>) -> Self[src]

Trait Implementations

impl Into<Value> for CouchFunc[src]

impl Serialize for CouchFunc[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

impl<T> Sealed<T> for T where
    T: ?Sized

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.