pub struct Map<'l> {
pub width: usize,
pub height: usize,
pub tags: HashMap<String, String>,
pub tiles: Vec<Tile<'l>>,
}Expand description
Fields§
§width: usize§height: usize§tiles: Vec<Tile<'l>>row major 2d array
(0, 0), (1, 0), (2, 0)
(0, 1), (1, 1), (2, 1)
(0, 2), (1, 2), (2, 2)
Implementations§
Trait Implementations§
source§impl Renderable for Map<'_>
impl Renderable for Map<'_>
source§impl<'l> Serializer<Map<'l>> for MapSerializer<'l>
impl<'l> Serializer<Map<'l>> for MapSerializer<'l>
source§fn deserialize(
&mut self,
buff: &mut DataRead<'_>
) -> Result<Map<'l>, Self::ReadError>
fn deserialize( &mut self, buff: &mut DataRead<'_> ) -> Result<Map<'l>, Self::ReadError>
deserialize a map
notes:
- does not deserialize data
- does not deserialize entities
source§fn serialize(
&mut self,
_: &mut DataWrite<'_>,
_: &Map<'_>
) -> Result<(), Self::WriteError>
fn serialize( &mut self, _: &mut DataWrite<'_>, _: &Map<'_> ) -> Result<(), Self::WriteError>
serialize a map (todo) panics: always
type ReadError = ReadError
type WriteError = ()
Auto Trait Implementations§
impl<'l> !RefUnwindSafe for Map<'l>
impl<'l> Send for Map<'l>
impl<'l> Sync for Map<'l>
impl<'l> Unpin for Map<'l>
impl<'l> !UnwindSafe for Map<'l>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more