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
|
|
@ -300,7 +300,7 @@ impl ControlClient {
|
|||
///
|
||||
/// # Errors
|
||||
/// Returns encoding, size, or stream failures.
|
||||
pub fn send<T: serde::Serialize>(
|
||||
pub fn send<T: lazaret_core::records::SchemaType + serde::Serialize>(
|
||||
stream: &mut impl Write,
|
||||
record: &T,
|
||||
) -> Result<(), ControlClientError> {
|
||||
|
|
@ -327,7 +327,7 @@ impl ControlClient {
|
|||
/// Returns framing, size, decoding, or stream failures.
|
||||
pub fn receive<T>(stream: &mut impl Read) -> Result<T, ControlClientError>
|
||||
where
|
||||
T: serde::de::DeserializeOwned + serde::Serialize,
|
||||
T: lazaret_core::records::SchemaType + serde::de::DeserializeOwned + serde::Serialize,
|
||||
{
|
||||
let mut length = [0_u8; 4];
|
||||
stream.read_exact(&mut length)?;
|
||||
|
|
|
|||
Loading…
Reference in a new issue