Skip to main content

NativeEventEndpoint

Trait NativeEventEndpoint 

Source
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§

Source

fn capability_id(&self) -> &'static str

Stable Capability series identity.

Source

fn descriptor_version(&self) -> &'static str

Exact Descriptor version implemented by this endpoint.

Source

fn operations(&self) -> &'static [&'static str]

Exact stable Event Operation names implemented by this endpoint.

Source

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§

Source

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".

Implementors§