Skip to main content

RpcDescriptor

Trait RpcDescriptor 

Source
pub trait RpcDescriptor {
    type Input: Serialize;
    type Output: DeserializeOwned;

    const KEY: &'static str;
    const SUBJECT: &'static str;
    const CALLER_CAPABILITIES: &'static [&'static str];
    const ERRORS: &'static [&'static str];
}
Expand description

Metadata required to call one typed Trellis RPC.

Required Associated Constants§

Source

const KEY: &'static str

Logical contract key for the RPC.

Source

const SUBJECT: &'static str

Concrete NATS subject for the RPC.

Source

const CALLER_CAPABILITIES: &'static [&'static str]

Capability requirements declared for callers.

Source

const ERRORS: &'static [&'static str]

Known error variants declared by the contract.

Required Associated Types§

Source

type Input: Serialize

Request payload type.

Source

type Output: DeserializeOwned

Success payload type.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§