[−][src]Struct turingdb_helpers::DocumentQuery
Handles all queries releated to fields
#[derive(Debug, Serialize, Clone)] pub struct DocumentQuery { db: String, document: Option<String>, }
Implementations
impl DocumentQuery
[src]
pub fn new() -> Self
[src]
pub fn db(&mut self, name: &str) -> &Self
[src]
Add a database name
Usage
use crate::DocumentQuery; let mut foo = DocumentQuery::new(); foo.db("db_name");
pub fn document(&mut self, name: &str) -> &Self
[src]
Add a document name
Usage
use crate::DocumentQuery; let mut foo = DocumentQuery::new(); foo .db("db_name") .document("document_name");
pub fn create(&self) -> Result<Vec<u8>>
[src]
Creates a new document in a database
Usage
use crate::DocumentQuery; let mut foo = DocumentQuery::new(); foo .db("db_name") .document("document_name") .create()
pub fn list(&self) -> Result<Vec<u8>>
[src]
List all documents in a database
Usage
use crate::DocumentQuery; let mut foo = DocumentQuery::new(); foo .db("db_name") .list()
pub fn drop(&self) -> Result<Vec<u8>>
[src]
Drops document in a database
Usage
use crate::DocumentQuery; let mut foo = DocumentQuery::new(); foo .db("db_name") .document("document_name") .drop()
Trait Implementations
impl Clone for DocumentQuery
[src]
fn clone(&self) -> DocumentQuery
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for DocumentQuery
[src]
impl Default for DocumentQuery
[src]
fn default() -> DocumentQuery
[src]
impl Serialize for DocumentQuery
[src]
Auto Trait Implementations
impl RefUnwindSafe for DocumentQuery
impl Send for DocumentQuery
impl Sync for DocumentQuery
impl Unpin for DocumentQuery
impl UnwindSafe for DocumentQuery
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,