Module serde

Source
Expand description

§Serialization

Restate sends data over the network for storing state, journaling actions, awakeables, etc.

Therefore, the types of the values that are stored, need to either:

  • be a primitive type
  • use a wrapper type Json for using serde-json. To enable JSON schema generation, you’ll need to enable the schemars feature. See PayloadMetadata for more details.
  • have the Serialize and Deserialize trait implemented. If you need to use a type for the handler input/output, you’ll also need to implement PayloadMetadata to reply with correct content type and enable JSON schema generation.

Structs§

InputMetadata
This struct encapsulates input payload metadata used by discovery.
Json
Wrapper type to use serde_json with Restate’s Serialize/Deserialize traits.
OutputMetadata
This struct encapsulates output payload metadata used by discovery.

Traits§

Deserialize
Deserialize trait for Restate services.
PayloadMetadata
Payload metadata and Json Schemas
Serialize
Serialize trait for Restate services.