Skip to main content

NativeRequestEndpoint

Trait NativeRequestEndpoint 

Source
pub trait NativeRequestEndpoint: Debug {
    // Required methods
    fn capability_id(&self) -> &'static str;
    fn descriptor_version(&self) -> &'static str;
    fn operations(&self) -> &'static [&'static str];
    fn invoke(
        &self,
        operation: &str,
        request: Box<dyn Any>,
        context: InvocationContext,
    ) -> LocalBoxFuture<'static, Result<Result<Box<dyn Any>, Box<dyn Any>>, RuntimeFailure>>;
}
Expand description

Type-erased native endpoint used only while Kernel constructs and dispatches the graph.

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 Operation names implemented by this endpoint.

Source

fn invoke( &self, operation: &str, request: Box<dyn Any>, context: InvocationContext, ) -> LocalBoxFuture<'static, Result<Result<Box<dyn Any>, Box<dyn Any>>, RuntimeFailure>>

Dispatches one operation without serializing its typed Rust payload.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§