Skip to main content

ServerEmitter

Trait ServerEmitter 

Source
pub trait ServerEmitter {
    // Required method
    fn emit(&self, service: &Service) -> Result<Vec<TokenStream>>;
}
Expand description

Emits a server interface for a lowered Service as top-level token items.

One implementation per target framework. AxumServer is the only one today.

Required Methods§

Source

fn emit(&self, service: &Service) -> Result<Vec<TokenStream>>

Emit the server-interface items (trait, response enums, router, handlers).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§