pub trait NativeEventEndpoint: Debug {
// Required methods
fn capability_id(&self) -> &'static str;
fn descriptor_version(&self) -> &'static str;
fn operations(&self) -> &'static [&'static str];
fn publish(
&self,
operation: &str,
event: Box<dyn Any>,
context: InvocationContext,
) -> LocalBoxFuture<'static, Result<(), RuntimeFailure>>;
// Provided method
fn owns_event_admission(&self) -> bool { ... }
}Expand description
Adapter-facing endpoint for one or more ephemeral Event Operations.
Required Methods§
Sourcefn capability_id(&self) -> &'static str
fn capability_id(&self) -> &'static str
Stable Capability series identity.
Sourcefn descriptor_version(&self) -> &'static str
fn descriptor_version(&self) -> &'static str
Exact Descriptor version implemented by this endpoint.
Sourcefn operations(&self) -> &'static [&'static str]
fn operations(&self) -> &'static [&'static str]
Exact stable Event Operation names implemented by this endpoint.
Sourcefn publish(
&self,
operation: &str,
event: Box<dyn Any>,
context: InvocationContext,
) -> LocalBoxFuture<'static, Result<(), RuntimeFailure>>
fn publish( &self, operation: &str, event: Box<dyn Any>, context: InvocationContext, ) -> LocalBoxFuture<'static, Result<(), RuntimeFailure>>
Publishes one value after the endpoint has admitted it.
Implementations must return once the value is accepted into their own bounded volatile queue. Subscriber handler failures after that point are deliberately outside the publisher’s response path.
Provided Methods§
Sourcefn owns_event_admission(&self) -> bool
fn owns_event_admission(&self) -> bool
Returns whether the Adapter owns the subscriber’s admission queue.
Native endpoints use the Kernel mailbox by default. An out-of-process
Adapter may return true when its transport has already admitted the
value into the subscriber’s own bounded queue before this call returns.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".