pub fn upcast_payload<From, To>(
event: &EventRecord,
to_version: u64,
transform: fn(From) -> To,
) -> Result<Vec<u8>, UpcastError>where
From: DeserializeOwned,
To: Serialize,Expand description
Decode an event payload, transform it with typed Rust values, and encode the result.