[−][src]Enum arangors::document::response::DocumentResponse
Standard Response when having CRUD operation on document
TODO could add more response variant as shown in official doc
200: is returned if the document was found
304: is returned if the “If-None-Match” header is given and the document has the same version
404: is returned if the document or collection was not found
412: is returned if an “If-Match” header is given and the found document has a different version. The response will also contain the found document’s current revision in the Etag header.
Variants
Silent is when there is empty object returned by the server
Contain data after CRUD
Implementations
impl<T> DocumentResponse<T>
[src]
Gives extra method on the DocumentResponse to quickly check what the server returns
pub fn is_silent(&self) -> bool
[src]
Should be true when the server send back an empty object {}
pub fn has_response(&self) -> bool
[src]
Should be true if there is a response from the server
pub fn header(&self) -> Option<&Header>
[src]
Return the document header contained inside the response
pub fn old_doc(&self) -> Option<&T>
[src]
Return the old document before changes
pub fn new_doc(&self) -> Option<&T>
[src]
Return the new document
pub fn old_rev(&self) -> Option<&String>
[src]
return the old revision of the document
Trait Implementations
impl<'de, T> Deserialize<'de> for DocumentResponse<T> where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
Auto Trait Implementations
impl<T> RefUnwindSafe for DocumentResponse<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for DocumentResponse<T> where
T: Send,
T: Send,
impl<T> Sync for DocumentResponse<T> where
T: Sync,
T: Sync,
impl<T> Unpin for DocumentResponse<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for DocumentResponse<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,