plotters::style

Trait AsRelative

Source
pub trait AsRelative: Into<f64> {
    // Provided methods
    fn percent_width(self) -> RelativeSize { ... }
    fn percent_height(self) -> RelativeSize { ... }
    fn percent(self) -> RelativeSize { ... }
}
Expand description

Allows a value turns into a relative size

Provided Methods§

Source

fn percent_width(self) -> RelativeSize

Make the value a relative size of percentage of width

Source

fn percent_height(self) -> RelativeSize

Make the value a relative size of percentage of height

Source

fn percent(self) -> RelativeSize

Make the value a relative size of percentage of minimal of height and width

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T: Into<f64>> AsRelative for T