Skip to main content

SegmentExt

Trait SegmentExt 

Source
pub trait SegmentExt {
    // Required methods
    fn human_friendly_kind_with_article(&self) -> &'static str;
    fn freedom(
        &self,
        lookup: impl Fn(ObjectId) -> Option<Freedom>,
    ) -> Option<Freedom>;
}
Expand description

Runtime helpers for Segment.

Required Methods§

Source

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

What kind of geometry is this (point, line, arc, etc) Suitable for use in user-facing messages.

Source

fn freedom( &self, lookup: impl Fn(ObjectId) -> Option<Freedom>, ) -> Option<Freedom>

Compute the overall freedom of this segment. For geometry types (Line, Arc, Circle) this looks up and merges the freedom of their constituent points. For points, returns the point’s own freedom directly. Returns None if a required point lookup failed.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl SegmentExt for Segment

Source§

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

Source§

fn freedom( &self, lookup: impl Fn(ObjectId) -> Option<Freedom>, ) -> Option<Freedom>

Implementors§