Skip to main content

Packer

Trait Packer 

Source
pub trait Packer: Send + Sync {
    // Required methods
    fn pack(&self, input: PackInput) -> Result<PackOutput, CoreError>;
    fn name(&self) -> &'static str;
}
Expand description

Common interface implemented by all packing algorithms.

Required Methods§

Source

fn pack(&self, input: PackInput) -> Result<PackOutput, CoreError>

Pack sprites onto a single sheet and return placements.

Source

fn name(&self) -> &'static str

Short human-readable name shown in log output.

Implementors§