use serde::{de::DeserializeOwned, Serialize};
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];
}
pub trait EventDescriptor {
type Event: Serialize + DeserializeOwned;
const KEY: &'static str;
const SUBJECT: &'static str;
const PUBLISH_CAPABILITIES: &'static [&'static str];
const SUBSCRIBE_CAPABILITIES: &'static [&'static str];
}
pub trait FeedDescriptor {
type Input: Serialize;
type Event: DeserializeOwned;
const KEY: &'static str;
const SUBJECT: &'static str;
const SUBSCRIBE_CAPABILITIES: &'static [&'static str];
}