Struct kinto_http::record::Record
[−]
[src]
pub struct Record { pub data: Option<Value>, pub permissions: Option<RecordPermissions>, pub client: KintoClient, pub bucket: Bucket, pub collection: Collection, pub id: String, pub timestamp: Option<u64>, }
Fields
data: Option<Value>
permissions: Option<RecordPermissions>
client: KintoClient
bucket: Bucket
collection: Collection
id: String
timestamp: Option<u64>
Methods
impl Record
[src]
fn new<'a>(client: KintoClient, collection: Collection, id: &'a str) -> Self
Create a new record resource.
Trait Implementations
impl Debug for Record
[src]
impl Clone for Record
[src]
fn clone(&self) -> Record
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 Record
[src]
impl Resource for Record
[src]
fn unwrap_response(&mut self, wrapper: ResponseWrapper)
Unwrap a request response and update the current object.
fn get_timestamp(&mut self) -> Option<u64>
Return the object version timestamp.
fn load_request(&mut self) -> GetRecord
Create a custom load request for the endpoint.
fn update_request(&mut self) -> UpdateRecord
Create a custom update request for the endpoint.
fn delete_request(&mut self) -> DeleteRecord
Create a custom delete request for the endpoint.
fn load(&mut self) -> Result<(), KintoError>
Load bucket by id if exists.
fn set(&mut self) -> Result<(), KintoError>
Set current object to the server (create or update).
fn create(&mut self) -> Result<(), KintoError>
Create if not exists the current object.
fn update(&mut self) -> Result<(), KintoError>
Update an existing object if exists with the current object.
fn delete(&mut self) -> Result<(), KintoError>
Delete the current object from the server if exists.
impl From<ResponseWrapper> for Record
[src]
fn from(wrapper: ResponseWrapper) -> Self
Performs the conversion.