pub struct TileDataReader<T: Read + Seek> { /* private fields */ }Expand description
A struct to help read out MapTileData and StaticTileData data
Implementations§
Source§impl TileDataReader<File>
impl TileDataReader<File>
Sourcepub fn new(mul_path: &Path) -> MulReaderResult<TileDataReader<File>>
pub fn new(mul_path: &Path) -> MulReaderResult<TileDataReader<File>>
Create a new TileDataReader from a mul path
Source§impl<T: Read + Seek> TileDataReader<T>
impl<T: Read + Seek> TileDataReader<T>
Sourcepub fn from_readable(reader: T) -> TileDataReader<T>
pub fn from_readable(reader: T) -> TileDataReader<T>
Create a TileDataReader from an existing file reader
Sourcepub fn read_map_tile_data(&mut self, idx: u32) -> MulReaderResult<MapTileData>
pub fn read_map_tile_data(&mut self, idx: u32) -> MulReaderResult<MapTileData>
Read a map tile’s associated data.
The ID matches the data in ArtReader’s read_tile
Sourcepub fn read_static_tile_data(
&mut self,
idx: u32,
) -> MulReaderResult<StaticTileData>
pub fn read_static_tile_data( &mut self, idx: u32, ) -> MulReaderResult<StaticTileData>
Read a static tile’s associated data.
The ID is read from the static offset, and matches the data in ArtReader’s read_static
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for TileDataReader<T>where
T: Freeze,
impl<T> RefUnwindSafe for TileDataReader<T>where
T: RefUnwindSafe,
impl<T> Send for TileDataReader<T>where
T: Send,
impl<T> Sync for TileDataReader<T>where
T: Sync,
impl<T> Unpin for TileDataReader<T>where
T: Unpin,
impl<T> UnsafeUnpin for TileDataReader<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for TileDataReader<T>where
T: UnwindSafe,
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