pub trait Asset {
// Required methods
fn get_chunks(&self) -> Option<Range<u32>>;
fn offset_chunks(&mut self, offset: i32);
fn get_sprite_chunks(&self) -> Option<Range<u32>>;
fn offset_sprite_chunks(&mut self, offset: i32);
}
Expand description
Trait for operations relevant to any assets, for writing asset management code which is generic over the particular asset type.
Required Methods§
Sourcefn get_chunks(&self) -> Option<Range<u32>>
fn get_chunks(&self) -> Option<Range<u32>>
If this asset refers to any regular chunks, returns the range referenced.
Sourcefn offset_chunks(&mut self, offset: i32)
fn offset_chunks(&mut self, offset: i32)
Applies an offset to all regular chunk references in the asset.
Sourcefn get_sprite_chunks(&self) -> Option<Range<u32>>
fn get_sprite_chunks(&self) -> Option<Range<u32>>
If this asset refers to any sprite chunks, returns the range referenced.
Sourcefn offset_sprite_chunks(&mut self, offset: i32)
fn offset_sprite_chunks(&mut self, offset: i32)
Applies an offset to all sprite chunk references in the asset.