Label

Trait Label 

Source
pub trait Label: SharedOwnership {
    // Required methods
    fn width(&self, scale: f32) -> f32;
    fn width_without_max_width(&self, scale: f32) -> f32;
}
Expand description

A text label created by a ResourceAllocator.

Required Methods§

Source

fn width(&self, scale: f32) -> f32

The width of the current text scaled by the scale factor provided. The scale is meant to be the distance from the descender to the ascender.

Source

fn width_without_max_width(&self, scale: f32) -> f32

The width of the current text scaled by the scale factor provided as if it wasn’t truncated by the maximum width that was provided. The scale is meant to be the distance from the descender to the ascender.

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<L: Label> Label for LabelHandle<L>

Source§

impl<P> Label for Label<P>