Make codec shape authority compile-time and fixed
This commit is contained in:
parent
bfe21dfb3f
commit
54cc167f81
1 changed files with 322 additions and 52 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue