pub struct PgSubscription {
pub start: StartFrom<PgCursor>,
pub stop_at: StopAt<PgCursor>,
pub filter: EventFilter,
pub batch_size: Option<usize>,
pub limit: Option<usize>,
pub partitions: PartitionSelection,
}Fields§
§start: StartFrom<PgCursor>§stop_at: StopAt<PgCursor>§filter: EventFilter§batch_size: Option<usize>§limit: Option<usize>§partitions: PartitionSelectionTrait Implementations§
Source§impl Clone for PgSubscription
impl Clone for PgSubscription
Source§fn clone(&self) -> PgSubscription
fn clone(&self) -> PgSubscription
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 PgSubscription
impl Debug for PgSubscription
Source§impl Default for PgSubscription
impl Default for PgSubscription
Source§impl PartitionableSubscription<PgCursor> for PgSubscription
impl PartitionableSubscription<PgCursor> for PgSubscription
Source§fn with_partitions(self, group: PartitionGroup) -> Self
fn with_partitions(self, group: PartitionGroup) -> Self
Restrict this subscription to a validated group of partitions sharing
the same partition_count. The reader emits a single SQL query per
poll using partition_id = ANY($::bigint[]) instead of one query per
partition. Single-partition uses fall through the default trait impl
which wraps in a singleton group; partition_id = ANY(ARRAY[$1])
plans identically to partition_id = $1 on modern Postgres.
Source§fn with_partition(self, partition: Partition) -> Selfwhere
Self: Sized,
fn with_partition(self, partition: Partition) -> Selfwhere
Self: Sized,
Restrict the subscription to a single partition. The default impl
wraps the partition in a singleton
PartitionGroup and delegates to
PartitionableSubscription::with_partitions. Backends override
only when a single-partition path is materially cheaper than the
multi-partition path (rare).Source§impl StartableSubscription<PgCursor> for PgSubscription
impl StartableSubscription<PgCursor> for PgSubscription
fn with_start(self, start: StartFrom<PgCursor>) -> Self
Source§fn with_starts(self, starts: Vec<StartFrom<C>>) -> Selfwhere
C: Ord,
fn with_starts(self, starts: Vec<StartFrom<C>>) -> Selfwhere
C: Ord,
Seed this subscription with a collection of candidate start
positions. Default behavior: pick the smallest
StartFrom::After(c)
from the vec and delegate to with_start. Other variants
(Earliest, Latest, Timestamp) are ignored by the default impl —
readers that support fan-in, dual historic+live consumption, or
topology-aware resume must override.Auto Trait Implementations§
impl Freeze for PgSubscription
impl RefUnwindSafe for PgSubscription
impl Send for PgSubscription
impl Sync for PgSubscription
impl Unpin for PgSubscription
impl UnsafeUnpin for PgSubscription
impl UnwindSafe for PgSubscription
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more