Skip to main content

Payload

Trait Payload 

Source
pub trait Payload:
    ZeroCopySend
    + Debug
    + 'static { }
Expand description

Marker trait for types that can be carried over a Channel<T> or Service<Req, Resp> — i.e., types that are ZeroCopySend + Debug + 'static.

Default is not required by the trait; it is only needed by Publisher::loan_send, which initialises the shared-memory slot via T::default() before handing it to the caller’s closure. If your type does not implement Default, use Publisher::loan instead.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl<T> Payload for T
where T: ZeroCopySend + Debug + 'static,