Make codec shape authority compile-time and fixed

This commit is contained in:
ms2k 2026-07-19 04:33:43 +09:00
commit 54cc167f81

View file

@ -377,7 +377,7 @@ fn send_outcome(
/// # Errors
/// Refuses oversized or unencodable records and stream write failures.
pub fn write_frame<T: Serialize>(
pub fn write_frame<T: lazaret_core::records::SchemaType + Serialize>(
stream: &mut UnixStream,
record: &T,
) -> Result<(), BootstrapWaiterError> {
@ -388,7 +388,7 @@ pub fn write_frame<T: Serialize>(
/// Refuses oversized, malformed, or incomplete frames and stream read failures.
pub fn read_frame<T>(stream: &mut UnixStream) -> Result<T, BootstrapWaiterError>
where
T: serde::de::DeserializeOwned + Serialize,
T: lazaret_core::records::SchemaType + serde::de::DeserializeOwned + Serialize,
{
read_waiter_frame(stream).map_err(failure)
}