pub trait PersistedStructuredFieldCodec {
// Required methods
fn encode_persisted_structured_payload(
&self,
) -> Result<Vec<u8>, InternalError>;
fn decode_persisted_structured_payload(
bytes: &[u8],
) -> Result<Self, InternalError>
where Self: Sized;
}Expand description
PersistedStructuredFieldCodec
Direct persisted payload codec for custom structured field values.
This trait owns only the typed field <-> persisted custom payload bytes
boundary used by persisted-row storage helpers.
It is persistence-only and MUST NOT mention runtime Value, rely on
generic fallback bridges, or widen into a general structural storage
authority.
Required Methods§
Sourcefn encode_persisted_structured_payload(&self) -> Result<Vec<u8>, InternalError>
fn encode_persisted_structured_payload(&self) -> Result<Vec<u8>, InternalError>
Encode this typed structured field into persisted custom payload bytes.
Sourcefn decode_persisted_structured_payload(
bytes: &[u8],
) -> Result<Self, InternalError>where
Self: Sized,
fn decode_persisted_structured_payload(
bytes: &[u8],
) -> Result<Self, InternalError>where
Self: Sized,
Decode this typed structured field from persisted custom payload bytes.