pub struct PolyRef<'a> { /* private fields */ }Expand description
A borrowed reference to a polygon.
Implementations§
Source§impl<'a> PolyRef<'a>
impl<'a> PolyRef<'a>
pub fn rect(&self) -> Rect
pub fn num_holes(&self) -> usize
pub fn clockwise(&self) -> bool
pub fn exterior(&self) -> RingRef<'a>
pub fn hole_at(&self, index: usize) -> Option<RingRef<'a>>
Sourcepub unsafe fn from_raw(ptr: *const tg_poly) -> Option<Self>
pub unsafe fn from_raw(ptr: *const tg_poly) -> Option<Self>
§Safety
The pointer must be valid for the lifetime 'a.
pub fn as_ptr(&self) -> *const tg_poly
pub fn to_owned(&self) -> Result<Poly>
Trait Implementations§
impl<'a> Copy for PolyRef<'a>
impl Send for PolyRef<'_>
impl Sync for PolyRef<'_>
Auto Trait Implementations§
impl<'a> Freeze for PolyRef<'a>
impl<'a> RefUnwindSafe for PolyRef<'a>
impl<'a> Unpin for PolyRef<'a>
impl<'a> UnwindSafe for PolyRef<'a>
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)