pub struct Page<T> {
pub data: Vec<T>,
pub has_more: Option<bool>,
pub first_id: Option<String>,
pub last_id: Option<String>,
pub object: Option<String>,
}Expand description
A single page of a paginated list response.
Mirrors the official list shape:
{"object": "list", "data": [...], "first_id": ..., "last_id": ..., "has_more": ...}. Fields other than data are optional because some
OpenAI-compatible providers omit them.
Fields§
§data: Vec<T>The items on this page.
has_more: Option<bool>Whether more items exist after this page.
first_id: Option<String>The ID of the first item on the page, for cursor pagination.
last_id: Option<String>The ID of the last item on the page, for cursor pagination.
object: Option<String>The object type (list), if the provider sends it.
Trait Implementations§
Source§impl<'de, T> Deserialize<'de> for Page<T>where
T: Deserialize<'de> + Default,
impl<'de, T> Deserialize<'de> for Page<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 Page<T>
impl<T> RefUnwindSafe for Page<T>where
Vec<T>: RefUnwindSafe,
impl<T> Send for Page<T>
impl<T> Sync for Page<T>
impl<T> Unpin for Page<T>
impl<T> UnsafeUnpin for Page<T>where
Vec<T>: UnsafeUnpin,
impl<T> UnwindSafe for Page<T>where
Vec<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