pub struct HttpClient { /* private fields */ }Implementations§
Source§impl HttpClient
impl HttpClient
pub fn new(base_url: &str) -> Self
pub fn with_database(self, database: &str) -> Self
pub fn set_database(&mut self, database: &str)
pub async fn login( &mut self, database: &str, username: &str, password: &str, ) -> Result<(), DriverError>
pub fn set_token(&mut self, token: &str)
pub async fn list_databases(&self) -> Result<Vec<String>, DriverError>
pub async fn create_database(&self, name: &str) -> Result<(), DriverError>
pub async fn list_collections( &self, database: Option<&str>, ) -> Result<Vec<Value>, DriverError>
pub async fn create_collection(&self, name: &str) -> Result<(), DriverError>
pub async fn insert( &self, collection: &str, document: Value, key: Option<&str>, ) -> Result<Value, DriverError>
pub async fn get( &self, collection: &str, key: &str, ) -> Result<Option<Value>, DriverError>
pub async fn update( &self, collection: &str, key: &str, document: Value, merge: bool, ) -> Result<(), DriverError>
pub async fn delete( &self, collection: &str, key: &str, ) -> Result<(), DriverError>
pub async fn list( &self, collection: &str, limit: i32, offset: i32, ) -> Result<Vec<Value>, DriverError>
pub async fn query( &self, sdbql: &str, bind_vars: Option<Value>, ) -> Result<Vec<Value>, DriverError>
pub async fn begin_transaction( &self, isolation_level: Option<&str>, ) -> Result<String, DriverError>
pub async fn commit_transaction(&self, tx_id: &str) -> Result<(), DriverError>
pub async fn rollback_transaction(&self, tx_id: &str) -> Result<(), DriverError>
pub async fn cluster_status(&self) -> Result<Value, DriverError>
pub async fn cluster_info(&self) -> Result<Value, DriverError>
pub async fn ping(&self) -> Result<bool, DriverError>
Auto Trait Implementations§
impl Freeze for HttpClient
impl !RefUnwindSafe for HttpClient
impl Send for HttpClient
impl Sync for HttpClient
impl Unpin for HttpClient
impl !UnwindSafe for HttpClient
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