pub trait AsPayload {
// Required method
fn to_payload(self) -> Value;
}Expand description
Represent a data that can be sent to a node worker. Under the hood, node worker can only receive and transfer back serde_json::Value. This trait is mainly for convenience as it is already implemented for all primitive types, and lets you send all kinds of data to a node worker without boilerplate.
Required Methods§
fn to_payload(self) -> Value
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".