Skip to main content

ChangeFeedRef

Struct ChangeFeedRef 

Source
pub struct ChangeFeedRef<'a, F: ChangeFeed> { /* private fields */ }
Expand description

Borrowing adapter for [run_change_feed] (does not take ownership of the feed).

Implementations§

Source§

impl<'a, F: ChangeFeed> ChangeFeedRef<'a, F>

Source

pub fn new(inner: &'a mut F) -> Self

Borrow a feed as a SourceDriver.

Trait Implementations§

Source§

impl<'a, F> SourceDriver for ChangeFeedRef<'a, F>
where F: ChangeFeed,

Source§

type Position = <F as ChangeFeed>::Position

Checkpoint / resume position type.
Source§

fn poll_work<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<Vec<PositionedEvent<Self::Position>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Next work items (row and/or relation changes). May be empty on idle.
Source§

fn advance_watermark<'life0, 'async_trait>( &'life0 mut self, position: Self::Position, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Mark position sink-safe. May be in-memory only, broker offset commit, or both — durable store writes belong in persist_checkpoint unless policy is CheckpointPolicy::AdvanceOnly.
Source§

fn is_finished(&self) -> bool

Whether the driver will produce no more work (EOF).
Source§

fn between_events<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<Vec<ControlSignal>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Polled between apply cycles; return control signals to handle before the next poll_work.
Source§

fn on_schema_refresh<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Handle ControlSignal::SchemaRefresh. Default: no-op.
Source§

fn on_adhoc_snapshot<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, _tables: &'life1 [String], _apply: &'life2 dyn AdhocApply, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn stop_reason(&self) -> Option<StopReason>

If Some, the runtime stops after draining in-flight apply work.
Source§

fn checkpoint_policy(&self) -> CheckpointPolicy

Checkpoint persistence policy. Default: CheckpointPolicy::PersistAfterAdvance.
Source§

fn persist_checkpoint<'life0, 'async_trait>( &'life0 mut self, _position: Self::Position, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Persist a sink-safe checkpoint (called after successful sink + advance_watermark according to CheckpointPolicy). Default: no-op.
Source§

fn read_progress_for_persist<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<Option<Self::Position>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Optional sink-safe position to persist when CheckpointPolicy::IntervalWhenDrained finds the apply window empty but nothing was advanced since the last persist (e.g. filtered-only binlog traffic that advanced the read cursor with no work items). Read more
Source§

fn note_sunk_events(&mut self, _count: u64)

Notify the driver that count input (pre-transform) events are accounted for before advance_watermark. Read more

Auto Trait Implementations§

§

impl<'a, F> !UnwindSafe for ChangeFeedRef<'a, F>

§

impl<'a, F> Freeze for ChangeFeedRef<'a, F>

§

impl<'a, F> RefUnwindSafe for ChangeFeedRef<'a, F>
where F: RefUnwindSafe,

§

impl<'a, F> Send for ChangeFeedRef<'a, F>

§

impl<'a, F> Sync for ChangeFeedRef<'a, F>
where F: Sync,

§

impl<'a, F> Unpin for ChangeFeedRef<'a, F>

§

impl<'a, F> UnsafeUnpin for ChangeFeedRef<'a, F>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more