pub struct Page<T> {
pub data: Vec<T>,
pub count: u64,
pub total: Option<u64>,
}Expand description
One page of list results, normalized across every wire envelope.
Fields§
§data: Vec<T>The items.
count: u64Item count as reported by the daemon; synthesized as data.len() for
bare-array endpoints (and envelopes that omit count).
total: Option<u64>Total matching rows across pages, when the endpoint reports one (runs);
None otherwise.
Implementations§
Trait Implementations§
Source§impl<'de, T: Deserialize<'de>> Deserialize<'de> for Page<T>
impl<'de, T: Deserialize<'de>> Deserialize<'de> for Page<T>
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<T> IntoIterator for Page<T>
impl<T> IntoIterator for Page<T>
Source§impl<'a, T> IntoIterator for &'a Page<T>
impl<'a, T> IntoIterator for &'a Page<T>
impl<T: PartialEq> StructuralPartialEq for Page<T>
Auto Trait Implementations§
impl<T> Freeze for Page<T>
impl<T> RefUnwindSafe for Page<T>where
T: RefUnwindSafe,
impl<T> Send for Page<T>where
T: Send,
impl<T> Sync for Page<T>where
T: Sync,
impl<T> Unpin for Page<T>where
T: Unpin,
impl<T> UnsafeUnpin for Page<T>
impl<T> UnwindSafe for Page<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