mcproto_types/lib.rs
1pub mod basic;
2pub mod component;
3pub mod json_text_component;
4pub mod text_component;
5
6pub trait TypeCodec {
7 fn encode(
8 &self,
9 writer: &mut impl std::io::Write,
10 ) -> Result<(), mcproto_codec::error::CodecError>;
11 fn decode(reader: &mut impl std::io::Read) -> Result<Self, mcproto_codec::error::CodecError>
12 where
13 Self: Sized;
14}