[−][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 async fn new() -> Self
[src]
pub async fn db<'_, '_, '_>(&'_ mut self, name: &'_ str) -> &'_ Self
[src]
Add a database name
Usage
use crate::DocumentQuery; let mut foo = DocumentQuery::new().await; foo.db("db_name").await;
pub async fn document<'_, '_, '_>(&'_ mut self, name: &'_ str) -> &'_ Self
[src]
Add a document name
Usage
use crate::DocumentQuery; let mut foo = DocumentQuery::new().await; foo .db("db_name").await .document("document_name").await;
pub async fn create<'_>(&'_ self) -> Result<Vec<u8>>
[src]
Creates a new document in a database
Usage
use crate::DocumentQuery; let mut foo = DocumentQuery::new().await; foo .db("db_name").await .document("document_name").await .create().await
pub async fn list<'_>(&'_ self) -> Result<Vec<u8>>
[src]
List all documents in a database
Usage
use crate::DocumentQuery; let mut foo = DocumentQuery::new().await; foo .db("db_name").await .list().await
pub async fn drop<'_>(&'_ self) -> Result<Vec<u8>>
[src]
Drops document in a database
Usage
use crate::DocumentQuery; let mut foo = DocumentQuery::new().await; foo .db("db_name").await .document("document_name").await .drop().await
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 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>,