use std::{future::Future, pin::Pin, sync::Arc}; use crate::RPCResult; use super::channel::Channel; /// Represents the RPC method pub type PubSubRPCMethod<'a> = Box, String, serde_json::Value) -> PubSubRPCMethodOutput<'a> + Send + 'a>; type PubSubRPCMethodOutput<'a> = Pin> + Send + Sync + 'a>>; /// Defines the interface for an RPC service. pub trait PubSubRPCService: Sync + Send { fn get_pubsub_method<'a>(&'a self, name: &'a str) -> Option; fn name(&self) -> String; }