pub struct CollectionResponse<T>where
T: 'static,{
pub data: Vec<T>,
pub meta: ResponseMeta,
pub links: Option<ResponseLinks>,
}Fields§
§data: Vec<T>§meta: ResponseMeta§links: Option<ResponseLinks>Implementations§
Source§impl<T: Serialize + 'static> CollectionResponse<T>
impl<T: Serialize + 'static> CollectionResponse<T>
pub fn new(data: Vec<T>) -> Self
pub fn paginated(data: Vec<T>, pagination: PaginationInfo) -> Self
pub fn with_links(self, links: ResponseLinks) -> Self
Trait Implementations§
Source§impl<T> Debug for CollectionResponse<T>where
T: 'static + Debug,
impl<T> Debug for CollectionResponse<T>where
T: 'static + Debug,
Source§impl<'de, T> Deserialize<'de> for CollectionResponse<T>where
T: 'static + Deserialize<'de>,
impl<'de, T> Deserialize<'de> for CollectionResponse<T>where
T: 'static + Deserialize<'de>,
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 CollectionResponse<T>
impl<T> RefUnwindSafe for CollectionResponse<T>where
T: RefUnwindSafe,
impl<T> Send for CollectionResponse<T>where
T: Send,
impl<T> Sync for CollectionResponse<T>where
T: Sync,
impl<T> Unpin for CollectionResponse<T>where
T: Unpin,
impl<T> UnwindSafe for CollectionResponse<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