pub struct Polygon<'a> { /* private fields */ }Expand description
A polygon borrowing its caller-owned vertex slice.
Implementations§
Source§impl<'a> Polygon<'a>
impl<'a> Polygon<'a>
Sourcepub fn new(points: &'a [Point]) -> Result<Self, GeometryError>
pub fn new(points: &'a [Point]) -> Result<Self, GeometryError>
Creates a polygon from at least three supplied points.
§Errors
Returns GeometryError::TooFewPoints when fewer than three points
are supplied.
Trait Implementations§
impl<'a> Copy for Polygon<'a>
impl<'a> StructuralPartialEq for Polygon<'a>
Auto Trait Implementations§
impl<'a> Freeze for Polygon<'a>
impl<'a> RefUnwindSafe for Polygon<'a>
impl<'a> Send for Polygon<'a>
impl<'a> Sync for Polygon<'a>
impl<'a> Unpin for Polygon<'a>
impl<'a> UnsafeUnpin for Polygon<'a>
impl<'a> UnwindSafe for Polygon<'a>
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