pub struct PgTableSource { /* private fields */ }Implementations§
Source§impl PgTableSource
impl PgTableSource
pub fn new(cfg: PgTableSourceConfig) -> Self
pub async fn iter_documents(&self) -> Result<Vec<Document>>
Trait Implementations§
Source§impl IncrementalSource for PgTableSource
impl IncrementalSource for PgTableSource
Source§type Cursor = PgTableCursor
type Cursor = PgTableCursor
Per-source cursor type. Must serde-round-trip (so the consumer can
persist it as JSON / YAML / a column).
Source§fn empty_cursor(&self) -> Self::Cursor
fn empty_cursor(&self) -> Self::Cursor
Initial cursor for a never-synced state. Returned by the consumer’s
first call before any documents are emitted.
Source§fn iter_changes_since(
&self,
cursor: &Self::Cursor,
) -> impl Future<Output = Result<Vec<Document>>> + Send
fn iter_changes_since( &self, cursor: &Self::Cursor, ) -> impl Future<Output = Result<Vec<Document>>> + Send
Stream documents changed since
cursor. May return
Err(StaleCursorError::new(...).into()) to signal the cursor is too
old; consumer should retry with empty_cursor().Source§fn cursor_from(&self, last_document: &Document) -> Self::Cursor
fn cursor_from(&self, last_document: &Document) -> Self::Cursor
Per-doc cursor DELTA. See trait docs for merge contract.
Auto Trait Implementations§
impl !Freeze for PgTableSource
impl !RefUnwindSafe for PgTableSource
impl !UnwindSafe for PgTableSource
impl Send for PgTableSource
impl Sync for PgTableSource
impl Unpin for PgTableSource
impl UnsafeUnpin for PgTableSource
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> 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