pub struct Client { /* private fields */ }Implementations§
Source§impl Client
Example
impl Client
Example
let mut client = appwrite::client::Client::new();
client.set_endpoint("Your Endpoint URL");
client.set_project("Your Project ID");
client.set_key("Your API Key");
// Create a user as a example
let userService = appwrite::services::Users::new(&client);
let response = userService.create("amadeus@example.com", "supersecurepassword", "Wolfgang Amadeus Mozart");
println!("{}", response.text().unwrap()); // Here you can also check the status code to see successpub fn new() -> Self
pub fn add_header(&mut self, key: String, value: String)
pub fn add_self_signed(&mut self, value: bool)
Sourcepub fn set_project(&mut self, value: &str)
pub fn set_project(&mut self, value: &str)
Sets Your project ID
pub fn set_locale(&mut self, value: &str)
pub fn set_mode(&mut self, value: &str)
pub fn set_endpoint(&mut self, endpoint: &str)
pub fn call( self, method: &str, path: &str, headers: Option<HashMap<String, String>>, params: Option<HashMap<String, ParamType>>, ) -> Result<Response, AppwriteException>
Trait Implementations§
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