pub struct GeomRef<'a> { /* private fields */ }Expand description
A borrowed reference to a geometry.
Implementations§
Source§impl GeomRef<'_>
impl GeomRef<'_>
pub fn geom_type(&self) -> GeomType
pub fn rect(&self) -> Rect
pub fn is_empty(&self) -> bool
Sourcepub unsafe fn from_raw(ptr: *const tg_geom) -> Option<Self>
pub unsafe fn from_raw(ptr: *const tg_geom) -> Option<Self>
§Safety
The pointer must be valid for the lifetime 'a.
pub fn as_ptr(&self) -> *const tg_geom
pub fn to_owned(&self) -> Result<Geom>
Trait Implementations§
impl<'a> Copy for GeomRef<'a>
impl Send for GeomRef<'_>
impl Sync for GeomRef<'_>
Auto Trait Implementations§
impl<'a> Freeze for GeomRef<'a>
impl<'a> RefUnwindSafe for GeomRef<'a>
impl<'a> Unpin for GeomRef<'a>
impl<'a> UnwindSafe for GeomRef<'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)