#[non_exhaustive]pub struct Capabilities { /* private fields */ }Expand description
What a connector can do, as declared by the connector itself.
Build one with Capabilities::builder; read it through the accessor
methods. Source-side and sink-side fields live in one type so a registry
can treat both alike; the fields that do not apply to a role stay at their
defaults.
Implementations§
Source§impl Capabilities
impl Capabilities
Sourcepub fn builder() -> CapabilitiesBuilder
pub fn builder() -> CapabilitiesBuilder
A builder with every capability off and no write modes.
Sourcepub fn to_builder(&self) -> CapabilitiesBuilder
pub fn to_builder(&self) -> CapabilitiesBuilder
A builder starting from these capabilities, to add or remove one.
Sourcepub fn plain_source() -> Self
pub fn plain_source() -> Self
What a plain source declares: nothing.
Sourcepub fn append_only_sink() -> Self
pub fn append_only_sink() -> Self
What a plain sink declares: append only.
Sourcepub fn of_source<S: Source + ?Sized>(source: &S) -> Self
pub fn of_source<S: Source + ?Sized>(source: &S) -> Self
Derive a source’s capabilities from its per-capability trait methods.
The default Source::capabilities; an
override that adds a capability no trait method expresses starts here
(Capabilities::of_source(self).to_builder().range_digest(true).build()).
Sourcepub fn of_sink<S: Sink + ?Sized>(sink: &S) -> Self
pub fn of_sink<S: Sink + ?Sized>(sink: &S) -> Self
Derive a sink’s capabilities from its per-capability trait methods.
The default Sink::capabilities.
Sourcepub fn decorated_source<S: Source + ?Sized>(
outer: &S,
inner: &Capabilities,
) -> Self
pub fn decorated_source<S: Source + ?Sized>( outer: &S, inner: &Capabilities, ) -> Self
A decorator’s capabilities: every field a trait method expresses is
derived from the decorator (which forwards or deliberately withholds
it), the rest is taken from the wrapped source’s inner declaration.
Sourcepub fn decorated_sink<S: Sink + ?Sized>(outer: &S, inner: &Capabilities) -> Self
pub fn decorated_sink<S: Sink + ?Sized>(outer: &S, inner: &Capabilities) -> Self
decorated_source for sinks.
Sourcepub fn write_modes(&self) -> &[WriteMode]
pub fn write_modes(&self) -> &[WriteMode]
Write modes the sink applies, in canonical order.
Sourcepub fn supports_write_mode(&self, mode: WriteMode) -> bool
pub fn supports_write_mode(&self, mode: WriteMode) -> bool
Whether the sink applies mode.
Sourcepub fn idempotent_writes(&self) -> bool
pub fn idempotent_writes(&self) -> bool
Commits a page’s rows and a commit token atomically.
Sourcepub fn keyed_upsert(&self) -> bool
pub fn keyed_upsert(&self) -> bool
Converges by key under write_mode: upsert — the keyed-upsert
effectively-once mechanism. A sink that forwards key to a target it
cannot vouch for accepts upsert without this.
Sourcepub fn keyed_dedup(&self) -> bool
pub fn keyed_dedup(&self) -> bool
This config dedups by key (write_mode: upsert|delete with a key).
Sourcepub fn schema_evolution(&self) -> bool
pub fn schema_evolution(&self) -> bool
Additive / widening DDL (on_drift: evolve).
Sourcepub fn schema_report(&self) -> SchemaReport
pub fn schema_report(&self) -> SchemaReport
How the sink treats fields its destination lacks.
Sourcepub fn scoped_overwrite(&self) -> bool
pub fn scoped_overwrite(&self) -> bool
A windowed overwrite.scope (#518).
Sourcepub fn direct_overwrite(&self) -> bool
pub fn direct_overwrite(&self) -> bool
A staging-free overwrite that understands the grouped staging signal.
Sourcepub fn staged_load(&self) -> bool
pub fn staged_load(&self) -> bool
Bulk load through an object-store stage (#528).
Sourcepub fn exactly_once(&self) -> bool
pub fn exactly_once(&self) -> bool
Deterministic replay from a bookmark (exactly-once source).
Sourcepub fn range_read(&self) -> bool
pub fn range_read(&self) -> bool
Reads one integer-key range through apply_shard without shard:
config (faucet verify range mode).
Sourcepub fn range_digest(&self) -> bool
pub fn range_digest(&self) -> bool
Computes a server-side digest of a key range (Source::range_digest).
Sourcepub fn reports_lag(&self) -> bool
pub fn reports_lag(&self) -> bool
Reports how far behind its head it is (Source::lag).
Sourcepub fn table_routing(&self) -> bool
pub fn table_routing(&self) -> bool
Names the table each record belongs to (Source::record_table), so
one change stream can drive a multi-table mirror.
Sourcepub fn read_side_effects(&self) -> bool
pub fn read_side_effects(&self) -> bool
Reading changes state outside the pipeline — creates or advances a replication slot or capture position, joins a consumer group, opens a listener or a live session — so a read-only preview must not read it.
Sourcepub fn replay_guarantee(&self) -> ReplayGuarantee
pub fn replay_guarantee(&self) -> ReplayGuarantee
The source’s typed replay guarantee.
Sourcepub fn sink_guarantee(&self) -> SinkGuarantee
pub fn sink_guarantee(&self) -> SinkGuarantee
The strongest delivery guarantee the sink can uphold.
Trait Implementations§
Source§impl Clone for Capabilities
impl Clone for Capabilities
Source§impl Debug for Capabilities
impl Debug for Capabilities
Source§impl Default for Capabilities
impl Default for Capabilities
impl Eq for Capabilities
Source§impl PartialEq for Capabilities
impl PartialEq for Capabilities
Source§impl Serialize for Capabilities
impl Serialize for Capabilities
impl StructuralPartialEq for Capabilities
Auto Trait Implementations§
impl Freeze for Capabilities
impl RefUnwindSafe for Capabilities
impl Send for Capabilities
impl Sync for Capabilities
impl Unpin for Capabilities
impl UnsafeUnpin for Capabilities
impl UnwindSafe for Capabilities
Blanket Implementations§
impl<T> Allocation for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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> ⓘ
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> ⓘ
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request