pub fn all_entries_from_category(&self, id: &str) -> Promise {
        let action = JsFuture::from(self.find(
            &JsValue::from_serde(&json!({
                "selector": {
                    "type": "passwd",
                    "catID": id,
                }
        })).unwrap()));

        future_to_promise(async move {
            match action.await {
                Ok(resolved) => {
                    match resolved.into_serde::<Value>() {
                        Ok(val) => {
                            Ok(JsValue::from_serde(&val["docs"]).unwrap())
                        },
                        Err(_) => {
                            Err(JsValue::undefined())
                        }
                    }
                },
                Err(_) => {
                    Err(JsValue::undefined())
                }
            }
        })
    }
/// Returns all password entries from a given category that is identified by an id.
Returns all password entries from a given category that is identified by an id.
Returns all password entries from a given category that is identified by an id .
pub fn all_entries_from_category(&self, id: &str) -> Promise {
        let action = JsFuture::from(self.find(
            &JsValue::from_serde(&json!({
                "selector": {
                    "type": "passwd",
                    "catID": id,
                }
        })).unwrap()));
        future_to_promise(async move {
            match action.await {
                Ok(resolved) => {
                    match resolved.into_serde::<Value>() {
                        Ok(val) => {
                            Ok(JsValue::from_serde(&val["docs"]).unwrap())
                        },
                        Err(_) => {
                            Err(JsValue::undefined())
                        }
                    }
                },
                Err(_) => {
                    Err(JsValue::undefined())
                }
            }
        })
    }
pub fn all_entries_from_category ( & self , id : & str ) -> Promise { let action = JsFuture :: from ( self . find ( & JsValue :: from_serde ( & json ! ( { " " { " " " " " " id } } ) ) . unwrap ( ) ) ) ; future_to_promise ( async move { match action . await { Ok ( resolved ) => { match resolved . into_serde :: < Value > ( ) { Ok ( val ) => { Ok ( JsValue :: from_serde ( & val [ " " ] ) . unwrap ( ) ) } , Err ( _ ) => { Err ( JsValue :: undefined ( ) ) } } } , Err ( _ ) => { Err ( JsValue :: undefined ( ) ) } } } ) }
Returns all password entries from a given category that is identified by an id.
Returns all password entries from a given category that is identified by an id .
&self
id
&str
&self
id
&str