pub struct PathSlice<'l> { /* private fields */ }Available on crate feature
canvas only.Expand description
A view on a Path.
Implementations§
Source§impl<'l> PathSlice<'l>
An immutable view over a Path.
impl<'l> PathSlice<'l>
An immutable view over a Path.
pub fn first_endpoint(&self) -> Option<(Point2D<f32, UnknownUnit>, &'l [f32])>
pub fn last_endpoint(&self) -> Option<(Point2D<f32, UnknownUnit>, &'l [f32])>
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) -> &'l [f32]
pub fn attributes(&self, endpoint: EndpointId) -> &'l [f32]
Returns a slice over an endpoint’s custom attributes.
Sourcepub fn reversed(&self) -> NoAttributes<Reversed<'_>> ⓘ
pub fn reversed(&self) -> NoAttributes<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§impl<'l> FromIterator<PathSlice<'l>> for PathBuffer
impl<'l> FromIterator<PathSlice<'l>> for PathBuffer
Source§fn from_iter<T>(iter: T) -> PathBufferwhere
T: IntoIterator<Item = PathSlice<'l>>,
fn from_iter<T>(iter: T) -> PathBufferwhere
T: IntoIterator<Item = PathSlice<'l>>,
Creates a value from an iterator. Read more
Source§impl<'l> Index<ControlPointId> for PathSlice<'l>
impl<'l> Index<ControlPointId> for PathSlice<'l>
Source§fn index(&self, id: ControlPointId) -> &Point2D<f32, UnknownUnit>
fn index(&self, id: ControlPointId) -> &Point2D<f32, UnknownUnit>
Performs the indexing (
container[index]) operation. Read moreSource§impl<'l> Index<EndpointId> for PathSlice<'l>
impl<'l> Index<EndpointId> for PathSlice<'l>
Source§fn index(&self, id: EndpointId) -> &Point2D<f32, UnknownUnit>
fn index(&self, id: EndpointId) -> &Point2D<f32, UnknownUnit>
Performs the indexing (
container[index]) operation. Read moreSource§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) -> Point2D<f32, UnknownUnit>
fn get_control_point(&self, id: ControlPointId) -> Point2D<f32, UnknownUnit>
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> UnsafeUnpin 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