pub struct VtigerQueryResponse {
pub success: bool,
pub result: Option<Vec<IndexMap<String, Value>>>,
pub error: Option<ApiError>,
}Expand description
Response format for Vtiger query operations that return multiple records.
This struct is used specifically for API calls that return arrays of data,
such as SELECT queries or list operations. It follows the same success/error
pattern as VtigerResponse but contains a vector of records instead of a single object.
§Examples
use indexmap::IndexMap;
use serde_json::json;
use vtiger_client::VtigerQueryResponse;
// Query response with multiple records
let response = VtigerQueryResponse {
success: true,
result: Some(vec![
IndexMap::from([("id".to_string(), json!("1"))]),
IndexMap::from([("id".to_string(), json!("2"))]),
]),
error: None,
};Fields§
§success: boolWhether the query operation succeeded
result: Option<Vec<IndexMap<String, Value>>>Array of records returned by the query (present when successful)
error: Option<ApiError>Error details (present when failed)
Trait Implementations§
Source§impl Debug for VtigerQueryResponse
impl Debug for VtigerQueryResponse
Source§impl<'de> Deserialize<'de> for VtigerQueryResponse
impl<'de> Deserialize<'de> for VtigerQueryResponse
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 VtigerQueryResponse
impl RefUnwindSafe for VtigerQueryResponse
impl Send for VtigerQueryResponse
impl Sync for VtigerQueryResponse
impl Unpin for VtigerQueryResponse
impl UnwindSafe for VtigerQueryResponse
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