pub struct StreamConfig {
pub mode: StreamMode,
pub include_subgraphs: bool,
pub subgraph_filter: Option<Vec<String>>,
pub output_keys: Option<Vec<String>>,
pub message_batch_config: MessageBatchConfig,
pub resumption: Option<StreamResumption>,
}Expand description
Configuration for streaming.
Fields§
§mode: StreamMode§include_subgraphs: bool§subgraph_filter: Option<Vec<String>>§output_keys: Option<Vec<String>>Optional field names to filter in Values/Updates events
message_batch_config: MessageBatchConfigBatching configuration for Messages mode streaming.
resumption: Option<StreamResumption>Resumption state for replaying a stream from a checkpoint.
When set, events at or before StreamResumption::last_step are
silently skipped so the consumer only receives new events.
Implementations§
Source§impl StreamConfig
impl StreamConfig
pub const fn new(mode: StreamMode) -> Self
pub const fn with_subgraphs(self, include: bool) -> Self
pub fn with_subgraph_filter(self, filter: Vec<String>) -> Self
Sourcepub fn with_output_keys(self, keys: Vec<String>) -> Self
pub fn with_output_keys(self, keys: Vec<String>) -> Self
Filter output to only include specified fields in Values/Updates events.
Sourcepub const fn with_message_batch_config(self, config: MessageBatchConfig) -> Self
pub const fn with_message_batch_config(self, config: MessageBatchConfig) -> Self
Set the batching configuration for Messages mode streaming.
Sourcepub fn with_resumption(self, resumption: StreamResumption) -> Self
pub fn with_resumption(self, resumption: StreamResumption) -> Self
Set the resumption state for checkpoint-based stream replay.
Events at or before resumption.last_step are silently skipped,
allowing consumers to resume from the last checkpoint without
receiving already-processed events.
Trait Implementations§
Source§impl Clone for StreamConfig
impl Clone for StreamConfig
Source§fn clone(&self) -> StreamConfig
fn clone(&self) -> StreamConfig
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 StreamConfig
impl Debug for StreamConfig
Source§impl Default for StreamConfig
impl Default for StreamConfig
Source§fn default() -> StreamConfig
fn default() -> StreamConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for StreamConfig
impl RefUnwindSafe for StreamConfig
impl Send for StreamConfig
impl Sync for StreamConfig
impl Unpin for StreamConfig
impl UnsafeUnpin for StreamConfig
impl UnwindSafe for StreamConfig
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