Skip to main content

FeatureView

Struct FeatureView 

Source
pub struct FeatureView<'a, V: Vertex, A = ()> { /* private fields */ }
Expand description

A borrowed view of one feature’s clipped polylines within a tile, yielded by TileView::iter_features / SlicerOne::iter_features.

Implementations§

Source§

impl<'a, V: Vertex, A> FeatureView<'a, V, A>

Source

pub fn attr(&self) -> &'a A

This feature’s per-feature attribute in this tile — the value passed to add_feature_with, duplicated onto every tile the feature touches. With the default A = () this is a reference to the unit value.

Source

pub fn iter_polylines(&self) -> impl Iterator<Item = &'a [V]> + use<'a, V, A>

Iterate this feature’s polylines (runs) in this tile, each a vertex slice in the tile’s local frame. A feature yields several polylines where the input left the tile and re-entered.

Auto Trait Implementations§

§

impl<'a, V, A> Freeze for FeatureView<'a, V, A>
where &'a [V]: Freeze, &'a A: Freeze,

§

impl<'a, V, A> RefUnwindSafe for FeatureView<'a, V, A>

§

impl<'a, V, A> Send for FeatureView<'a, V, A>
where &'a [V]: Send, &'a A: Send,

§

impl<'a, V, A> Sync for FeatureView<'a, V, A>
where &'a [V]: Sync, &'a A: Sync,

§

impl<'a, V, A> Unpin for FeatureView<'a, V, A>
where &'a [V]: Unpin, &'a A: Unpin,

§

impl<'a, V, A> UnsafeUnpin for FeatureView<'a, V, A>

§

impl<'a, V, A> UnwindSafe for FeatureView<'a, V, A>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.