Skip to main content

ResponseSerializer

Trait ResponseSerializer 

Source
pub trait ResponseSerializer<T>:
    Send
    + Sync
    + 'static {
    type Output: Serialize;

    // Required method
    fn serialize(value: T) -> Self::Output;
}

Required Associated Types§

Required Methods§

Source

fn serialize(value: T) -> Self::Output

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§