pub struct Client { /* private fields */ }Implementations§
Source§impl Client
impl Client
Sourcepub async fn connect(addr: &str) -> Result<Self>
pub async fn connect(addr: &str) -> Result<Self>
Connect to an Aurora server at the given address.
pub async fn new_collection( &mut self, name: &str, fields: Vec<(String, FieldType, bool)>, ) -> Result<()>
pub async fn insert( &mut self, collection: &str, data: HashMap<String, Value>, ) -> Result<String>
pub async fn get_document( &mut self, collection: &str, id: &str, ) -> Result<Option<Document>>
pub async fn query( &mut self, builder: SimpleQueryBuilder, ) -> Result<Vec<Document>>
pub async fn begin_transaction(&mut self) -> Result<u64>
pub async fn commit_transaction(&mut self) -> Result<()>
pub async fn rollback_transaction(&mut self) -> Result<()>
pub async fn delete(&mut self, key: &str) -> Result<()>
Auto Trait Implementations§
impl !Freeze for Client
impl RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnwindSafe for Client
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more