pub trait StrokeWidth {
// Required methods
fn stroke_width(&self) -> f32;
fn apply_stroke_func(
&mut self,
f: impl for<'a> Fn(&'a mut [Width]),
) -> &mut Self;
// Provided method
fn set_stroke_width(&mut self, width: f32) -> &mut Self { ... }
}Expand description
A trait for items have stroke width
Required Methods§
Sourcefn stroke_width(&self) -> f32
fn stroke_width(&self) -> f32
Get the stroke width
Sourcefn apply_stroke_func(
&mut self,
f: impl for<'a> Fn(&'a mut [Width]),
) -> &mut Self
fn apply_stroke_func( &mut self, f: impl for<'a> Fn(&'a mut [Width]), ) -> &mut Self
Applying stroke width function to an item
Provided Methods§
Sourcefn set_stroke_width(&mut self, width: f32) -> &mut Self
fn set_stroke_width(&mut self, width: f32) -> &mut Self
Setting stroke width of an item
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.