Trait kinto_http::resource::Resource [] [src]

pub trait Resource: Serialize + Deserialize + Clone {
    fn unwrap_response(&mut self, wrapper: ResponseWrapper);
    fn get_timestamp(&mut self) -> Option<u64>;
    fn load_request(&mut self) -> GetRecord;
    fn update_request(&mut self) -> UpdateRecord;
    fn delete_request(&mut self) -> DeleteRecord;

    fn load(&mut self) -> Result<(), KintoError> { ... }
    fn set(&mut self) -> Result<(), KintoError> { ... }
    fn create(&mut self) -> Result<(), KintoError> { ... }
    fn update(&mut self) -> Result<(), KintoError> { ... }
    fn delete(&mut self) -> Result<(), KintoError> { ... }
}

Implement a Kinto core resource client.

Required Methods

Unwrap a request response and update the current object.

Return the object version timestamp.

Create a custom load request for the endpoint.

Create a custom update request for the endpoint.

Create a custom delete request for the endpoint.

Provided Methods

Load bucket by id if exists.

Set current object to the server (create or update).

Create if not exists the current object.

Update an existing object if exists with the current object.

Delete the current object from the server if exists.

Implementors