Struct kinto_http::client::KintoClient
[−]
[src]
pub struct KintoClient { pub server_url: String, pub http_client: Client, pub auth: Option<Authorization<Basic>>, }
Client for the Kinto HTTP API.
Fields
server_url: String
http_client: Client
auth: Option<Authorization<Basic>>
Methods
impl KintoClient
[src]
fn new(server_url: String, auth: Option<Authorization<Basic>>) -> KintoClient
Create a client.
fn bucket(&mut self, id: &'static str) -> Bucket
Select an existing bucket.
fn new_bucket(&mut self) -> Result<Bucket, KintoError>
Create a new empty bucket with a generated id.
fn list_buckets(&mut self) -> Result<Vec<String>, KintoError>
List the names of all available buckets.
fn delete_buckets(&mut self) -> Result<(), KintoError>
Delete all available buckets.
fn create_bucket_request(&mut self) -> CreateRecord
Create a custom request for a new bucket.
fn list_buckets_request(&mut self) -> GetCollection
Create a custom request for listing buckets.
fn delete_buckets_request(&mut self) -> DeleteCollection
Create a custom request for deleting buckets.
fn flush(&mut self) -> Result<(), KintoError>
Flush the server (if the flush endpoint is enabled).
Trait Implementations
impl Debug for KintoClient
[src]
impl Clone for KintoClient
[src]
fn clone(&self) -> KintoClient
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Default for KintoClient
[src]
fn default() -> KintoClient
Returns the "default value" for a type. Read more