#[non_exhaustive]pub struct ConnectorDescriptor { /* private fields */ }Expand description
A connector’s static description: its type: name and a pure function
from its config to its Capabilities. Registered with the connector’s
factory so load-time gates can read capabilities without building it.
Implementations§
Source§impl ConnectorDescriptor
impl ConnectorDescriptor
Sourcepub const fn new(
kind: &'static str,
capabilities: fn(&Value) -> Capabilities,
) -> Self
pub const fn new( kind: &'static str, capabilities: fn(&Value) -> Capabilities, ) -> Self
Describe connector kind by capabilities, which must be pure (no
I/O) and must agree with the built connector’s capabilities().
Sourcepub fn capabilities(&self, config: &Value) -> Capabilities
pub fn capabilities(&self, config: &Value) -> Capabilities
The capabilities the connector has under config (a config object).
Sourcepub fn kind_capabilities(&self) -> Capabilities
pub fn kind_capabilities(&self) -> Capabilities
The kind-level view: every capability some config of this connector
enables — what listings and “supported: …” messages show. The
descriptor function answers it when called with Value::Null.
Trait Implementations§
Source§impl Clone for ConnectorDescriptor
impl Clone for ConnectorDescriptor
impl Copy for ConnectorDescriptor
Auto Trait Implementations§
impl Freeze for ConnectorDescriptor
impl RefUnwindSafe for ConnectorDescriptor
impl Send for ConnectorDescriptor
impl Sync for ConnectorDescriptor
impl Unpin for ConnectorDescriptor
impl UnsafeUnpin for ConnectorDescriptor
impl UnwindSafe for ConnectorDescriptor
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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 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>
Wrap the input message
T in a tonic::Request