pub struct NativePointer { /* private fields */ }Expand description
Borrowed opaque native address used for backend interop handles.
The value does not own, retain, dereference, or validate the pointed-to object. Passing it to MapLibre Native transfers no ownership and grants the Rust binding no memory access.
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 caller must ensure the address has the correct backend-native type for every API it is passed to, and that the native object stays valid for the complete borrow required by that API. This wrapper does not validate provenance, alignment, lifetime, thread ownership, or backend type.
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