Trait Backend

Source
pub trait Backend {
    const NS_NAMES: &'static [&'static str];

    // Required method
    fn handle_request<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        req: Request,
        res: ResponseSender,
        subscribers: &'life1 mut SubscriberMap,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;

    // Provided methods
    fn rpc_members() -> HashMap<&'static str, Vec<String>> { ... }
    fn zod_namespaces(    ) -> HashMap<&'static str, Vec<&'static NamespaceMemberDefinition>> { ... }
    fn generate<T>() -> String
       where T: ClientCodegen { ... }
    fn generate_with_options<T>(options: CodegenOptions) -> String
       where T: ClientCodegen { ... }
}

Required Associated Constants§

Source

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

Required Methods§

Source

fn handle_request<'life0, 'life1, 'async_trait>( &'life0 mut self, req: Request, res: ResponseSender, subscribers: &'life1 mut SubscriberMap, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Provided Methods§

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§