Trait Asset

Source
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§

Source

fn get_chunks(&self) -> Option<Range<u32>>

If this asset refers to any regular chunks, returns the range referenced.

Source

fn offset_chunks(&mut self, offset: i32)

Applies an offset to all regular chunk references in the asset.

Source

fn get_sprite_chunks(&self) -> Option<Range<u32>>

If this asset refers to any sprite chunks, returns the range referenced.

Source

fn offset_sprite_chunks(&mut self, offset: i32)

Applies an offset to all sprite chunk references in the asset.

Implementors§