pub struct LineRef<'a> { /* private fields */ }Expand description
A borrowed reference to a line string.
Implementations§
Source§impl LineRef<'_>
impl LineRef<'_>
pub fn rect(&self) -> Rect
pub fn num_points(&self) -> usize
pub fn point_at(&self, index: usize) -> Option<Point>
pub fn points(&self) -> &[Point]
pub fn num_segments(&self) -> usize
pub fn segment_at(&self, index: usize) -> Option<Segment>
pub fn clockwise(&self) -> bool
pub fn length(&self) -> f64
Sourcepub unsafe fn from_raw(ptr: *const tg_line) -> Option<Self>
pub unsafe fn from_raw(ptr: *const tg_line) -> Option<Self>
§Safety
The pointer must be valid for the lifetime 'a.
pub fn as_ptr(&self) -> *const tg_line
pub fn to_owned(&self) -> Result<Line>
Trait Implementations§
impl<'a> Copy for LineRef<'a>
impl Send for LineRef<'_>
impl Sync for LineRef<'_>
Auto Trait Implementations§
impl<'a> Freeze for LineRef<'a>
impl<'a> RefUnwindSafe for LineRef<'a>
impl<'a> Unpin for LineRef<'a>
impl<'a> UnwindSafe for LineRef<'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)