use std::{future::Future, pin::Pin}; use crate::RPCResult; /// Represents the RPC method pub type RPCMethod<'a> = Box RPCMethodOutput<'a> + Send + 'a>; type RPCMethodOutput<'a> = Pin> + Send + Sync + 'a>>; /// Defines the interface for an RPC service. pub trait RPCService: Sync + Send { fn get_method<'a>(&'a self, name: &'a str) -> Option; fn name(&self) -> String; }