pub struct PathSlice<'l> { /* private fields */ }
Expand description
A view on a Path
.
Implementations
sourceimpl<'l> PathSlice<'l>
impl<'l> PathSlice<'l>
An immutable view over a Path.
pub fn first_endpoint(&self) -> Option<(Point, Attributes<'l>)>
pub fn last_endpoint(&self) -> Option<(Point, Attributes<'l>)>
sourcepub fn iter<'a>(&'a self) -> Iter<'l>ⓘNotable traits for Iter<'l>impl<'l> Iterator for Iter<'l> type Item = PathEvent;
pub fn iter<'a>(&'a self) -> Iter<'l>ⓘNotable traits for Iter<'l>impl<'l> Iterator for Iter<'l> type Item = PathEvent;
Iterates over the path.
sourcepub fn id_iter(&self) -> IdIter<'_>ⓘNotable traits for IdIter<'l>impl<'l> Iterator for IdIter<'l> type Item = IdEvent;
pub fn id_iter(&self) -> IdIter<'_>ⓘNotable traits for IdIter<'l>impl<'l> Iterator for IdIter<'l> type Item = IdEvent;
Iterates over the endpoint and control point ids of the Path
.
sourcepub fn iter_with_attributes(&self) -> IterWithAttributes<'_>ⓘNotable traits for IterWithAttributes<'l>impl<'l> Iterator for IterWithAttributes<'l> type Item = Event<(Point, Attributes<'l>), Point>;
pub fn iter_with_attributes(&self) -> IterWithAttributes<'_>ⓘNotable traits for IterWithAttributes<'l>impl<'l> Iterator for IterWithAttributes<'l> type Item = Event<(Point, Attributes<'l>), Point>;
Iterates over the entire Path
with custom attributes.
pub fn is_empty(&self) -> bool
sourcepub fn attributes(&self, endpoint: EndpointId) -> Attributes<'l>
pub fn attributes(&self, endpoint: EndpointId) -> Attributes<'l>
Returns a slice over an endpoint’s custom attributes.
sourcepub fn reversed(&self) -> IterNoAttributes<Reversed<'_>>ⓘNotable traits for NoAttributes<Iter>impl<'l, Iter> Iterator for NoAttributes<Iter> where
Iter: Iterator<Item = Event<(Point, Attributes<'l>), Point>>, type Item = PathEvent;
pub fn reversed(&self) -> IterNoAttributes<Reversed<'_>>ⓘNotable traits for NoAttributes<Iter>impl<'l, Iter> Iterator for NoAttributes<Iter> where
Iter: Iterator<Item = Event<(Point, Attributes<'l>), Point>>, type Item = PathEvent;
Iter: Iterator<Item = Event<(Point, Attributes<'l>), Point>>, type Item = PathEvent;
Returns a reversed version of this path in the form of an iterator
Trait Implementations
sourceimpl<'l> AttributeStore for PathSlice<'l>
impl<'l> AttributeStore for PathSlice<'l>
sourcefn get(&self, id: EndpointId) -> Attributes<'l>
fn get(&self, id: EndpointId) -> Attributes<'l>
Returns the endpoint’s custom attributes as a slice of 32 bits floats. Read more
sourcefn num_attributes(&self) -> usize
fn num_attributes(&self) -> usize
Returns the number of float attributes per endpoint. Read more
sourceimpl<'l> FromIterator<PathSlice<'l>> for PathBuffer
impl<'l> FromIterator<PathSlice<'l>> for PathBuffer
sourcefn from_iter<T: IntoIterator<Item = PathSlice<'l>>>(iter: T) -> PathBuffer
fn from_iter<T: IntoIterator<Item = PathSlice<'l>>>(iter: T) -> PathBuffer
Creates a value from an iterator. Read more
sourceimpl<'l> Index<ControlPointId> for PathSlice<'l>
impl<'l> Index<ControlPointId> for PathSlice<'l>
sourceimpl<'l> Index<EndpointId> for PathSlice<'l>
impl<'l> Index<EndpointId> for PathSlice<'l>
sourceimpl<'l, 'a> IntoIterator for &'a PathSlice<'l>
impl<'l, 'a> IntoIterator for &'a PathSlice<'l>
sourceimpl<'l> IntoIterator for PathSlice<'l>
impl<'l> IntoIterator for PathSlice<'l>
sourceimpl<'l> PositionStore for PathSlice<'l>
impl<'l> PositionStore for PathSlice<'l>
fn get_endpoint(&self, id: EndpointId) -> Point
fn get_control_point(&self, id: ControlPointId) -> Point
impl<'l> Copy for PathSlice<'l>
Auto Trait Implementations
impl<'l> RefUnwindSafe for PathSlice<'l>
impl<'l> Send for PathSlice<'l>
impl<'l> Sync for PathSlice<'l>
impl<'l> Unpin for PathSlice<'l>
impl<'l> UnwindSafe for PathSlice<'l>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more