pub struct BatchControl {
pub batch_num: u32,
pub has_more: bool,
pub status: BatchStatus,
pub last_seq_id: Option<SeqId>,
}Expand description
Batch control metadata for paginated initial data loading.
Fields§
§batch_num: u32Current batch number (0-indexed).
has_more: boolWhether more batches are available to fetch.
status: BatchStatusLoading status for the subscription.
last_seq_id: Option<SeqId>The SeqId of the last row in this batch (used for subsequent requests).
Implementations§
Source§impl BatchControl
impl BatchControl
Sourcepub fn first(has_more: bool) -> BatchControl
pub fn first(has_more: bool) -> BatchControl
Create a batch control for the first batch (batch_num=0).
Sourcepub fn subsequent(batch_num: u32, has_more: bool) -> BatchControl
pub fn subsequent(batch_num: u32, has_more: bool) -> BatchControl
Create a batch control for a subsequent batch (batch_num > 0).
Trait Implementations§
Source§impl Clone for BatchControl
impl Clone for BatchControl
Source§fn clone(&self) -> BatchControl
fn clone(&self) -> BatchControl
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 Debug for BatchControl
impl Debug for BatchControl
Source§impl<'de> Deserialize<'de> for BatchControl
impl<'de> Deserialize<'de> for BatchControl
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<BatchControl, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<BatchControl, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for BatchControl
Source§impl PartialEq for BatchControl
impl PartialEq for BatchControl
Source§fn eq(&self, other: &BatchControl) -> bool
fn eq(&self, other: &BatchControl) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for BatchControl
impl Serialize for BatchControl
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for BatchControl
Auto Trait Implementations§
impl Freeze for BatchControl
impl RefUnwindSafe for BatchControl
impl Send for BatchControl
impl Sync for BatchControl
impl Unpin for BatchControl
impl UnsafeUnpin for BatchControl
impl UnwindSafe for BatchControl
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.