pub struct NativePointer { /* private fields */ }Expand description
Borrowed opaque native address used for backend interop handles. It does not own, retain, dereference, or validate the pointed-to object, and passing it to MapLibre Native transfers no ownership.
Implementations§
Source§impl NativePointer
impl NativePointer
Sourcepub unsafe fn from_address(address: usize) -> Self
pub unsafe fn from_address(address: usize) -> Self
Creates an opaque borrowed pointer value from a native address.
§Safety
The address must have the correct backend-native type for every API it is passed to, and the native object must stay valid for the whole borrow that API requires. This wrapper validates nothing.
Sourcepub unsafe fn from_ptr<T>(ptr: *mut T) -> Self
pub unsafe fn from_ptr<T>(ptr: *mut T) -> Self
Creates an opaque borrowed pointer value from a raw pointer.
§Safety
The pointer must satisfy the same requirements as
NativePointer::from_address.
Trait Implementations§
Source§impl Clone for NativePointer
impl Clone for NativePointer
Source§fn clone(&self) -> NativePointer
fn clone(&self) -> NativePointer
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NativePointer
impl Debug for NativePointer
Source§impl Hash for NativePointer
impl Hash for NativePointer
Source§impl PartialEq for NativePointer
impl PartialEq for NativePointer
impl Copy for NativePointer
impl Eq for NativePointer
impl StructuralPartialEq for NativePointer
Auto Trait Implementations§
impl Freeze for NativePointer
impl RefUnwindSafe for NativePointer
impl !Send for NativePointer
impl !Sync for NativePointer
impl Unpin for NativePointer
impl UnsafeUnpin for NativePointer
impl UnwindSafe for NativePointer
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