Struct buffer_graphics_lib::image_loading::tilesets::BasicTileset
source · pub struct BasicTileset { /* private fields */ }
Expand description
BasicTileset can be used for simple tile sets/atlas
The format is: { name: string, optional image_file: string, path tile_sizes: width: integer, px height: integer, px tiles: [ id: string x: integer, coord (ie this tile will be x * width .. (x + 1) * width) y: integer, coord ] }
Implementations
sourceimpl BasicTileset
impl BasicTileset
sourcepub fn load_from_file(
path: &str
) -> Result<HashMap<String, Image>, ImageWrapperError>
pub fn load_from_file(
path: &str
) -> Result<HashMap<String, Image>, ImageWrapperError>
See BasicTileset for format
Returns tile ids mapped to Images
Trait Implementations
sourceimpl Clone for BasicTileset
impl Clone for BasicTileset
sourcefn clone(&self) -> BasicTileset
fn clone(&self) -> BasicTileset
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for BasicTileset
impl Debug for BasicTileset
sourceimpl<'de> Deserialize<'de> for BasicTileset
impl<'de> Deserialize<'de> for BasicTileset
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl PartialEq<BasicTileset> for BasicTileset
impl PartialEq<BasicTileset> for BasicTileset
sourcefn eq(&self, other: &BasicTileset) -> bool
fn eq(&self, other: &BasicTileset) -> bool
impl Eq for BasicTileset
impl StructuralEq for BasicTileset
impl StructuralPartialEq for BasicTileset
Auto Trait Implementations
impl RefUnwindSafe for BasicTileset
impl Send for BasicTileset
impl Sync for BasicTileset
impl Unpin for BasicTileset
impl UnwindSafe for BasicTileset
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more