pub trait SerializedView: View {
type Format: OwnedDeserializer<Self::Value>;
fn format() -> Self::Format;
fn deserialize(data: &[u8]) -> Result<Self::Value, Error> { ... }
fn serialize(item: &Self::Value) -> Result<Vec<u8, Global>, Error> { ... }
}
Expand description
A View
with additional tyes and logic to handle serializing view values.
Associated Types
type Format: OwnedDeserializer<Self::Value>
type Format: OwnedDeserializer<Self::Value>
The serialization format for this view.
Required methods
Returns the configured instance of Self::Format
.
Provided methods
Deserialize data
as Self::Value
using this views’s format.