pub struct VtigerResponse {
pub success: bool,
pub result: Option<IndexMap<String, Value>>,
pub error: Option<ApiError>,
}Expand description
Response wrapper for all Vtiger REST API calls.
This struct represents the standard response format returned by the Vtiger API. All API responses follow this structure, containing a success flag, optional result data, and optional error information.
§Fields
success- Indicates whether the API call was successfulresult- Contains the response data when the call succeedserror- Contains error details when the call fails
§Examples
use vtiger_client::{ApiError, VtigerResponse};
use indexmap::IndexMap;
// Successful response
let success_response = VtigerResponse {
success: true,
result: Some(IndexMap::new()),
error: None,
};
// Error response
let error_response = VtigerResponse {
success: false,
result: None,
error: Some(ApiError {
code: "404".to_string(),
message: "Not Found".to_string(),
}),
};Fields§
§success: boolIndicates whether the API call was successful
result: Option<IndexMap<String, Value>>Contains the response data when success is true
error: Option<ApiError>Contains error details when success is false
Trait Implementations§
Source§impl Debug for VtigerResponse
impl Debug for VtigerResponse
Source§impl<'de> Deserialize<'de> for VtigerResponse
impl<'de> Deserialize<'de> for VtigerResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for VtigerResponse
impl RefUnwindSafe for VtigerResponse
impl Send for VtigerResponse
impl Sync for VtigerResponse
impl Unpin for VtigerResponse
impl UnsafeUnpin for VtigerResponse
impl UnwindSafe for VtigerResponse
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