Skip to main content

ResourceScale

Trait ResourceScale 

Source
pub trait ResourceScale<D, R> {
    // Required methods
    fn scale(&self, request: D) -> R;
    fn domain(&self) -> (D, D);
    fn range(&self) -> (R, R);
}
Expand description

Resource scaling trait (analogous to graphics Scale<D, R>)

Required Methods§

Source

fn scale(&self, request: D) -> R

Scale a request from domain to range

Source

fn domain(&self) -> (D, D)

Get domain bounds

Source

fn range(&self) -> (R, R)

Get range bounds

Implementors§