pub struct ChangeStreamBuilder { /* private fields */ }Expand description
Builder for Change Stream configuration.
Implementations§
Source§impl ChangeStreamBuilder
impl ChangeStreamBuilder
Sourcepub fn collection(self, name: impl Into<String>) -> Self
pub fn collection(self, name: impl Into<String>) -> Self
Watch a specific collection.
Sourcepub fn operations(self, types: &[ChangeType]) -> Self
pub fn operations(self, types: &[ChangeType]) -> Self
Filter by operation types.
Sourcepub fn full_document(self, policy: FullDocument) -> Self
pub fn full_document(self, policy: FullDocument) -> Self
Request full document on updates.
Sourcepub fn full_document_before_change(
self,
policy: FullDocumentBeforeChange,
) -> Self
pub fn full_document_before_change( self, policy: FullDocumentBeforeChange, ) -> Self
Request full document before change.
Sourcepub fn resume_after(self, token: impl Into<String>) -> Self
pub fn resume_after(self, token: impl Into<String>) -> Self
Resume from a specific token.
Sourcepub fn max_await_time_ms(self, ms: u64) -> Self
pub fn max_await_time_ms(self, ms: u64) -> Self
Set maximum await time.
Sourcepub fn batch_size(self, size: u32) -> Self
pub fn batch_size(self, size: u32) -> Self
Set batch size.
Sourcepub fn build_pipeline(&self) -> &[PipelineStage]
pub fn build_pipeline(&self) -> &[PipelineStage]
Get the pipeline stages.
Sourcepub fn build_options(&self) -> &ChangeStreamOptions
pub fn build_options(&self) -> &ChangeStreamOptions
Get the options.
Trait Implementations§
Source§impl Clone for ChangeStreamBuilder
impl Clone for ChangeStreamBuilder
Source§fn clone(&self) -> ChangeStreamBuilder
fn clone(&self) -> ChangeStreamBuilder
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 ChangeStreamBuilder
impl Debug for ChangeStreamBuilder
Source§impl Default for ChangeStreamBuilder
impl Default for ChangeStreamBuilder
Source§fn default() -> ChangeStreamBuilder
fn default() -> ChangeStreamBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ChangeStreamBuilder
impl RefUnwindSafe for ChangeStreamBuilder
impl Send for ChangeStreamBuilder
impl Sync for ChangeStreamBuilder
impl Unpin for ChangeStreamBuilder
impl UnwindSafe for ChangeStreamBuilder
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