pub trait SyncSwitchbackCodec: Send + Sync {
// Required methods
fn serialize(&self, manual: &ReferenceManual) -> Result<Vec<u8>>;
fn deserialize(&self, bytes: &[u8]) -> Result<ReferenceManual>;
}Expand description
Synchronous compatibility API for callers that cannot wrap SwitchbackCodec.
Secondary API per ADR 0002. Prefer SwitchbackCodec for service-side pipelines.
Required Methods§
Sourcefn serialize(&self, manual: &ReferenceManual) -> Result<Vec<u8>>
fn serialize(&self, manual: &ReferenceManual) -> Result<Vec<u8>>
Serializes a reference manual to switchback wire bytes.
Sourcefn deserialize(&self, bytes: &[u8]) -> Result<ReferenceManual>
fn deserialize(&self, bytes: &[u8]) -> Result<ReferenceManual>
Deserializes switchback wire bytes into a reference manual.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".