pub trait Block: Sized {
type Track: Track;
type Extra;
type Coord;
// Required methods
fn extra_data(&self) -> Self::Extra;
fn pos(&self) -> (Self::Coord, Self::Coord, Self::Coord);
fn rot(&self) -> u8;
fn decode(
data: &[u8],
offset: &mut usize,
id: u8,
meta: <Self::Track as Track>::Metadata,
) -> Option<Self>;
fn encode(&self, data: &mut Vec<u8>, meta: <Self::Track as Track>::Metadata);
}Required Associated Types§
Required Methods§
fn extra_data(&self) -> Self::Extra
fn pos(&self) -> (Self::Coord, Self::Coord, Self::Coord)
fn rot(&self) -> u8
fn decode( data: &[u8], offset: &mut usize, id: u8, meta: <Self::Track as Track>::Metadata, ) -> Option<Self>
fn encode(&self, data: &mut Vec<u8>, meta: <Self::Track as Track>::Metadata)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".