pub struct ItemSearchResult<T> {
pub items: Option<Vec<T>>,
pub total: Option<i32>,
pub limit: Option<i32>,
pub offset: Option<i32>,
pub has_more: Option<bool>,
}Expand description
Generic search result model for items
This struct represents a paginated search result containing a list of items of type T, along with metadata about the total count, pagination limits, and whether more results are available.
§Type Parameters
T- The type of items contained in the search result
§Examples
use qobuz_api_rust::models::ItemSearchResult;
let result: ItemSearchResult<String> = ItemSearchResult {
items: Some(vec!["item1".to_string(), "item2".to_string()]),
total: Some(100),
limit: Some(10),
offset: Some(0),
has_more: Some(true),
};Fields§
§items: Option<Vec<T>>List of items in the search result
total: Option<i32>Total number of items matching the search criteria
limit: Option<i32>Maximum number of items returned per page
offset: Option<i32>Offset indicating how many items were skipped
has_more: Option<bool>Whether there are more items available beyond the current page
Trait Implementations§
Source§impl<T: Clone> Clone for ItemSearchResult<T>
impl<T: Clone> Clone for ItemSearchResult<T>
Source§fn clone(&self) -> ItemSearchResult<T>
fn clone(&self) -> ItemSearchResult<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Debug> Debug for ItemSearchResult<T>
impl<T: Debug> Debug for ItemSearchResult<T>
Source§impl<T> Default for ItemSearchResult<T>
impl<T> Default for ItemSearchResult<T>
Source§impl<'de, T> Deserialize<'de> for ItemSearchResult<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for ItemSearchResult<T>where
T: 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 ItemSearchResult<T>
impl<T> RefUnwindSafe for ItemSearchResult<T>where
T: RefUnwindSafe,
impl<T> Send for ItemSearchResult<T>where
T: Send,
impl<T> Sync for ItemSearchResult<T>where
T: Sync,
impl<T> Unpin for ItemSearchResult<T>where
T: Unpin,
impl<T> UnwindSafe for ItemSearchResult<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