pub struct Subscription {
pub view: String,
pub key: Option<String>,
pub partition: Option<String>,
pub filters: Option<HashMap<String, String>>,
pub take: Option<u32>,
pub skip: Option<u32>,
pub with_snapshot: Option<bool>,
pub after: Option<String>,
pub snapshot_limit: Option<usize>,
}Fields§
§view: String§key: Option<String>§partition: Option<String>§filters: Option<HashMap<String, String>>§take: Option<u32>§skip: Option<u32>§with_snapshot: Option<bool>Whether to include initial snapshot (defaults to true for backward compatibility)
after: Option<String>Cursor for resuming from a specific point (_seq value)
snapshot_limit: Option<usize>Maximum number of entities to include in snapshot (pagination hint)
Implementations§
Source§impl Subscription
impl Subscription
pub fn new(view: impl Into<String>) -> Self
pub fn with_key(self, key: impl Into<String>) -> Self
pub fn with_filters(self, filters: HashMap<String, String>) -> Self
pub fn with_take(self, take: u32) -> Self
pub fn with_skip(self, skip: u32) -> Self
Sourcepub fn with_snapshot(self, with_snapshot: bool) -> Self
pub fn with_snapshot(self, with_snapshot: bool) -> Self
Set whether to include the initial snapshot (defaults to true)
Sourcepub fn after(self, cursor: impl Into<String>) -> Self
pub fn after(self, cursor: impl Into<String>) -> Self
Set the cursor to resume from (for reconnecting and getting only newer data)
Sourcepub fn with_snapshot_limit(self, limit: usize) -> Self
pub fn with_snapshot_limit(self, limit: usize) -> Self
Set the maximum number of entities to include in the snapshot
pub fn sub_key(&self) -> String
Trait Implementations§
Source§impl Clone for Subscription
impl Clone for Subscription
Source§fn clone(&self) -> Subscription
fn clone(&self) -> Subscription
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 Debug for Subscription
impl Debug for Subscription
Source§impl<'de> Deserialize<'de> for Subscription
impl<'de> Deserialize<'de> for Subscription
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 Subscription
impl PartialEq for Subscription
Source§impl Serialize for Subscription
impl Serialize for Subscription
impl Eq for Subscription
impl StructuralPartialEq for Subscription
Auto Trait Implementations§
impl Freeze for Subscription
impl RefUnwindSafe for Subscription
impl Send for Subscription
impl Sync for Subscription
impl Unpin for Subscription
impl UnsafeUnpin for Subscription
impl UnwindSafe for Subscription
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