pub struct GenericResponse<T> {
pub count: i64,
pub data: Vec<T>,
pub total: i64,
}
Expand description
Generic response base appearing in multiple routes
You shouldn’t have to use this structure directly, use type aliases instead
Fields§
§count: i64
Indicates the number of objects in the Data
array
data: Vec<T>
An array containing a list of objects returned by the endpoint
total: i64
Indicates the number of objects in the Data
array
Trait Implementations§
Source§impl<T: Default> Default for GenericResponse<T>
impl<T: Default> Default for GenericResponse<T>
Source§fn default() -> GenericResponse<T>
fn default() -> GenericResponse<T>
Returns the “default value” for a type. Read more
Source§impl<'de, T> Deserialize<'de> for GenericResponse<T>where
T: Deserialize<'de> + Default,
impl<'de, T> Deserialize<'de> for GenericResponse<T>where
T: Deserialize<'de> + Default,
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<T> Freeze for GenericResponse<T>
impl<T> RefUnwindSafe for GenericResponse<T>where
T: RefUnwindSafe,
impl<T> Send for GenericResponse<T>where
T: Send,
impl<T> Sync for GenericResponse<T>where
T: Sync,
impl<T> Unpin for GenericResponse<T>where
T: Unpin,
impl<T> UnwindSafe for GenericResponse<T>where
T: UnwindSafe,
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