Skip to main content

Feature

Trait Feature 

Source
pub trait Feature:
    Display
    + DynClone
    + Debug {
    // Required methods
    fn name(&self) -> &'static str;
    fn translate(&mut self, v: Coordinate<f64>);
    fn edge_union(&self) -> Option<MultiPolygon<f64>>;
    fn interior(&self) -> Vec<InnerAtom>;

    // Provided method
    fn edge_subtract(&self) -> Option<MultiPolygon<f64>> { ... }
}
Expand description

A top-level unit that makes up the geometry of the panel.

Required Methods§

Source

fn name(&self) -> &'static str

Human-readable name describing the construction.

Source

fn translate(&mut self, v: Coordinate<f64>)

Adjust all coordinates by the specified amount. Should affect all geometries returned from Feature::edge_union, Feature::edge_subtract, and Feature::interior.

Source

fn edge_union(&self) -> Option<MultiPolygon<f64>>

Returns the outer geometry describing the boundaries of the panel, which should be unioned with the outer geometry of all other features.

Source

fn interior(&self) -> Vec<InnerAtom>

Returns the inner geometry describing features on the panel, within the bounds of the computed edge geometry.

Provided Methods§

Source

fn edge_subtract(&self) -> Option<MultiPolygon<f64>>

Returns the outer geometry describing the boundaries of the panel, which should be subtracted from the outer geometry of all other features.

Trait Implementations§

Source§

impl<'a> Feature for Box<dyn Feature + 'a>

Source§

fn name(&self) -> &'static str

Human-readable name describing the construction.
Source§

fn translate(&mut self, v: Coordinate<f64>)

Adjust all coordinates by the specified amount. Should affect all geometries returned from Feature::edge_union, Feature::edge_subtract, and Feature::interior.
Source§

fn edge_union(&self) -> Option<MultiPolygon<f64>>

Returns the outer geometry describing the boundaries of the panel, which should be unioned with the outer geometry of all other features.
Source§

fn interior(&self) -> Vec<InnerAtom>

Returns the inner geometry describing features on the panel, within the bounds of the computed edge geometry.
Source§

fn edge_subtract(&self) -> Option<MultiPolygon<f64>>

Returns the outer geometry describing the boundaries of the panel, which should be subtracted from the outer geometry of all other features.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<'a> Feature for Box<dyn Feature + 'a>

Implementors§

Source§

impl Feature for RMount

Source§

impl Feature for Unit

Source§

impl<U, S> Feature for AtPos<U, S>
where U: Feature + Debug + Clone, S: Feature + Debug + Clone,

Source§

impl<U: Feature + Clone> Feature for Tile<U>

Source§

impl<U: Feature + Debug + Clone> Feature for Column<U>

Source§

impl<U: InnerFeature + Clone + Debug> Feature for Circle<U>

Source§

impl<U: InnerFeature + Clone + Debug> Feature for Rect<U>

Source§

impl<U: InnerFeature + Clone + Debug> Feature for Triangle<U>

Source§

impl<U> Feature for Negative<U>
where U: Feature + Debug + Clone,

Source§

impl<U> Feature for Rotate<U>
where U: Feature + Debug + Clone,