pub struct PathSlice<'l> { /* private fields */ }
Expand description
A view on a Path
.
Implementations§
source§impl<'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 id_iter(&self) -> IdIter<'_> ⓘ
pub fn id_iter(&self) -> IdIter<'_> ⓘ
Iterates over the endpoint and control point ids of the Path
.
sourcepub fn iter_with_attributes(&self) -> IterWithAttributes<'_> ⓘ
pub fn iter_with_attributes(&self) -> IterWithAttributes<'_> ⓘ
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<'_>> ⓘ
pub fn reversed(&self) -> IterNoAttributes<Reversed<'_>> ⓘ
Returns a reversed version of this path in the form of an iterator
Trait Implementations§
source§impl<'l> AttributeStore for PathSlice<'l>
impl<'l> AttributeStore for PathSlice<'l>
source§fn 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
source§fn num_attributes(&self) -> usize
fn num_attributes(&self) -> usize
Returns the number of float attributes per endpoint. Read more
source§impl<'l> FromIterator<PathSlice<'l>> for PathBuffer
impl<'l> FromIterator<PathSlice<'l>> for PathBuffer
source§fn 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
source§impl<'l> Index<ControlPointId> for PathSlice<'l>
impl<'l> Index<ControlPointId> for PathSlice<'l>
source§impl<'l> Index<EndpointId> for PathSlice<'l>
impl<'l> Index<EndpointId> for PathSlice<'l>
source§impl<'l, 'a> IntoIterator for &'a PathSlice<'l>
impl<'l, 'a> IntoIterator for &'a PathSlice<'l>
source§impl<'l> IntoIterator for PathSlice<'l>
impl<'l> IntoIterator for PathSlice<'l>
source§impl<'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> Freeze for PathSlice<'l>
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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)