Unnamed repository; edit this file 'description' to name the repository.
remove codec and framing
| -rw-r--r-- | crates/proc-macro-api/src/transport/codec.rs | 15 | ||||
| -rw-r--r-- | crates/proc-macro-api/src/transport/framing.rs | 14 |
2 files changed, 0 insertions, 29 deletions
diff --git a/crates/proc-macro-api/src/transport/codec.rs b/crates/proc-macro-api/src/transport/codec.rs deleted file mode 100644 index c9afad260a..0000000000 --- a/crates/proc-macro-api/src/transport/codec.rs +++ /dev/null @@ -1,15 +0,0 @@ -//! Protocol codec - -use std::io; - -use serde::de::DeserializeOwned; - -use crate::transport::framing::Framing; - -pub mod json; -pub mod postcard; - -pub trait Codec: Framing { - fn encode<T: serde::Serialize>(msg: &T) -> io::Result<Self::Buf>; - fn decode<T: DeserializeOwned>(buf: &mut Self::Buf) -> io::Result<T>; -} diff --git a/crates/proc-macro-api/src/transport/framing.rs b/crates/proc-macro-api/src/transport/framing.rs deleted file mode 100644 index 56c3b68e8c..0000000000 --- a/crates/proc-macro-api/src/transport/framing.rs +++ /dev/null @@ -1,14 +0,0 @@ -//! Protocol framing - -use std::io::{self, BufRead, Write}; - -pub trait Framing { - type Buf: Default + Send + Sync; - - fn read<'a, R: BufRead + ?Sized>( - inp: &mut R, - buf: &'a mut Self::Buf, - ) -> io::Result<Option<&'a mut Self::Buf>>; - - fn write<W: Write + ?Sized>(out: &mut W, buf: &Self::Buf) -> io::Result<()>; -} |