pub trait ConsumeEffectCodec:
DowncastType
+ Clone
+ Debug
+ PartialEq
+ Send
+ Sync
+ 'static {
// Required methods
fn read_fields(compound: &NbtCompound) -> Option<Self>;
fn write_fields(&self, compound: &mut NbtCompound);
fn read_network(data: &mut Cursor<&[u8]>) -> Result<Self>;
fn write_network(&self, writer: &mut Vec<u8>) -> Result<()>;
fn hash_fields(&self, entries: &mut Vec<HashEntry>);
}Expand description
Concrete payload behavior required by a registered consume-effect type.
Required Methods§
fn read_fields(compound: &NbtCompound) -> Option<Self>
fn write_fields(&self, compound: &mut NbtCompound)
fn read_network(data: &mut Cursor<&[u8]>) -> Result<Self>
fn write_network(&self, writer: &mut Vec<u8>) -> Result<()>
fn hash_fields(&self, entries: &mut Vec<HashEntry>)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".