#[non_exhaustive]pub struct SessionListResponse {
pub items: Vec<SessionItem>,
pub next_cursor: String,
}Expand description
The response envelope for GET /v1/sessions.
Models the contract’s SessionListResponse schema.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.items: Vec<SessionItem>The contract’s items.
next_cursor: StringThe contract’s next_cursor.
Implementations§
Source§impl SessionListResponse
impl SessionListResponse
Sourcepub fn into_page(self) -> Page<SessionItem>
pub fn into_page(self) -> Page<SessionItem>
This listing as one page of the crate’s pagination convention.
The envelope is items plus next_cursor, which is exactly
crate::page::Page — so a caller walking sessions reaches the same
loop, the same three spellings of “no more pages”, and the same guard
against a server that repeats a cursor as every other listing.
Trait Implementations§
Source§impl Clone for SessionListResponse
impl Clone for SessionListResponse
Source§fn clone(&self) -> SessionListResponse
fn clone(&self) -> SessionListResponse
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ContractModel for SessionListResponse
impl ContractModel for SessionListResponse
Source§impl Debug for SessionListResponse
impl Debug for SessionListResponse
Source§impl Default for SessionListResponse
impl Default for SessionListResponse
Source§fn default() -> SessionListResponse
fn default() -> SessionListResponse
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SessionListResponsewhere
SessionListResponse: Default,
impl<'de> Deserialize<'de> for SessionListResponsewhere
SessionListResponse: 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
Source§impl PartialEq for SessionListResponse
impl PartialEq for SessionListResponse
Source§impl Serialize for SessionListResponse
impl Serialize for SessionListResponse
impl StructuralPartialEq for SessionListResponse
Auto Trait Implementations§
impl Freeze for SessionListResponse
impl RefUnwindSafe for SessionListResponse
impl Send for SessionListResponse
impl Sync for SessionListResponse
impl Unpin for SessionListResponse
impl UnsafeUnpin for SessionListResponse
impl UnwindSafe for SessionListResponse
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