LayerTrait

Trait LayerTrait 

Source
pub trait LayerTrait<P: PathTrait<D>, D: PathDataTrait>: Default + Transforms {
Show 14 methods // Required methods fn from_paths_and_metadata(paths: Vec<P>, metadata: LayerMetadata) -> Self; fn paths(&self) -> &[P]; fn paths_mut(&mut self) -> &mut Vec<P>; fn metadata(&self) -> &LayerMetadata; fn metadata_mut(&mut self) -> &mut LayerMetadata; // Provided methods fn new() -> Self { ... } fn for_each<F>(&mut self, f: F) where F: Fn(&mut P) { ... } fn bounds(&self) -> Option<Rect> { ... } fn push_path(&mut self, path: impl Into<P>) { ... } fn merge(&mut self, other: &Self) { ... } fn sort(&mut self, flip: bool) { ... } fn sort_with_builder(&mut self, builder: IndexBuilder) { ... } fn pen_up_trajectories(&self) -> Vec<(Point, Point)> { ... } fn stats(&self) -> LayerStats { ... }
}

Required Methods§

Source

fn from_paths_and_metadata(paths: Vec<P>, metadata: LayerMetadata) -> Self

Source

fn paths(&self) -> &[P]

Source

fn paths_mut(&mut self) -> &mut Vec<P>

Source

fn metadata(&self) -> &LayerMetadata

Source

fn metadata_mut(&mut self) -> &mut LayerMetadata

Provided Methods§

Source

fn new() -> Self

Source

fn for_each<F>(&mut self, f: F)
where F: Fn(&mut P),

Source

fn bounds(&self) -> Option<Rect>

Source

fn push_path(&mut self, path: impl Into<P>)

Source

fn merge(&mut self, other: &Self)

Merge another layer into this one.

Also merges the metadata, see LayerMetadata::merge.

Source

fn sort(&mut self, flip: bool)

Source

fn sort_with_builder(&mut self, builder: IndexBuilder)

Source

fn pen_up_trajectories(&self) -> Vec<(Point, Point)>

Source

fn stats(&self) -> LayerStats

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§