rustify::endpoint

Trait Wrapper

Source
pub trait Wrapper:
    DeserializeOwned
    + Send
    + Sync {
    type Value;
}
Expand description

Represents a generic wrapper that can be applied to Endpoint results.

Some APIs use a generic wrapper when returning responses that contains information about the response and the actual response data in a subfield. This trait allows implementing a generic wrapper which can be used with EndpointResult::wrap to automatically wrap the Endpoint::Response in the wrapper. The only requirement is that the Wrapper::Value must enclose the Endpoint::Response.

Required Associated Types§

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§