Expand description
Safe Rust binding for the MapLibre Native C API.
This crate owns Rust-specific ergonomics and safety policy: thread-affine
public handles, parent retention, owner-thread Drop, Rust errors,
callback closure APIs, and lifetime-scoped render resources. Shared C ABI
adaptation lives in maplibre-native-core.
Structs§
- Animation
Options - Optional animation controls for camera transitions.
- Bound
Options - Optional map camera constraint fields.
- Byte
Range - Byte range requested for a network resource.
- Camera
FitOptions - Optional fitting controls for camera-for-viewport queries.
- Camera
Options - Camera fields used for snapshots and camera commands.
- Canonical
Tile Id - Canonical tile identity used by custom geometry source callbacks.
- Custom
Geometry Source Options - Options used when adding a custom geometry source.
- Detached
Render Session Handle - Render session after backend resources have been detached.
- Edge
Insets - Screen-space inset in logical map pixels.
- EglContext
Descriptor - Error
- Feature
- Owned GeoJSON feature descriptor.
- Feature
State Selector - Source, feature, and state-key selector for render-session feature state.
- Frame
Native Pointer - Borrowed opaque native address whose validity is tied to an active texture frame.
- Frame
OpenGL Texture Name - Borrowed OpenGL texture object name tied to an active texture frame.
- Free
Camera Options - Free camera position and orientation in MapLibre Native camera space.
- Handle
Operation Error - Error returned by consuming one-shot handle operations when the handle remains live and the operation can be retried.
- Json
Member - Ordered JSON object member. Duplicate keys are preserved.
- LatLng
- Geographic coordinate in degrees.
- LatLng
Bounds - Geographic bounds in degrees.
- LogRecord
- Copied MapLibre Native log record.
- LogSeverity
Mask - Mask of log severities that MapLibre Native may dispatch asynchronously.
- MapDebug
Options - MapLibre debug overlay mask bits.
- MapHandle
- Owner-thread map handle bound to a retained runtime.
- MapId
- Rust-assigned identity for a map owned by a runtime.
- MapOptions
- Options used when creating a map.
- MapProjection
Handle - Standalone projection snapshot created from a map transform.
- MapTile
Options - Tile prefetch and LOD tuning controls.
- MapViewport
Options - Live map viewport and render-transform controls.
- Metal
Borrowed Texture Descriptor - Metal
Context Descriptor - Metal
Owned Texture Descriptor - Metal
Owned Texture Frame - Copied metadata for an acquired Metal session-owned texture frame.
- Metal
Owned Texture Frame Handle - RAII guard for an acquired Metal session-owned texture frame.
- Metal
Surface Descriptor - Native
Pointer - Borrowed opaque native address used for backend interop handles.
- Offline
Operation Completed Event - Offline operation-completion event payload.
- Offline
Operation Handle - Owner-thread offline database operation token that must be taken or discarded.
- Offline
Region Info - Offline region snapshot copied from native storage.
- Offline
Region Response Error Event - Offline region response-error event payload.
- Offline
Region Status - Offline region status copied from native event payloads.
- Offline
Region Status Event - Offline region status-change event payload.
- Offline
Region Tile Count Limit Event - Offline region tile-count-limit event payload.
- OpenGL
Borrowed Texture Descriptor - OpenGL
Context Provider Mask - OpenGL context providers compiled into the linked native library.
- OpenGL
Owned Texture Descriptor - OpenGL
Owned Texture Frame - Copied metadata for an acquired OpenGL session-owned texture frame.
- OpenGL
Owned Texture Frame Handle - RAII guard for an acquired OpenGL session-owned texture frame.
- OpenGL
Surface Descriptor - Premultiplied
Rgba8 Image - Projected
Meters - Lower-level Spherical Mercator projected-meter coordinate.
- Projection
Mode - Axonometric rendering options for the live map render transform.
- Quaternion
- Quaternion stored as x, y, z, w components.
- Queried
Feature - One copied query result feature.
- Render
Backend Mask - Render backends compiled into the linked native library.
- Render
Frame Event - Render-frame event payload.
- Render
MapEvent - Render-map event payload.
- Render
Session Handle - Owner-thread render session handle bound to a retained map.
- Render
Target Extent - Rendered
Feature Query Options - Options for rendered feature queries.
- Rendering
Stats - Rendering statistics copied from a render-frame event payload.
- Resource
Request - Copied request passed to a runtime-scoped resource provider callback.
- Resource
Request Handle - Owned handle for a resource provider request selected for handling.
- Resource
Response - Response used to complete a handled resource request.
- Resource
Transform Request - Copied request passed to a runtime-scoped resource transform callback.
- Runtime
Event - Owned runtime event copied from native poll storage.
- Runtime
Handle - Owner-thread runtime handle for MapLibre Native work and event polling.
- Runtime
Options - Options used when creating a runtime.
- Screen
Box - Screen-space box in logical map pixels.
- Screen
Point - Screen-space point in logical map pixels.
- Source
Feature Query Options - Options for source feature queries.
- Source
Info - Copied fixed metadata for one style source.
- Style
Image - Copied runtime style image pixels with style-specific metadata.
- Style
Image Info - Copied fixed metadata for one runtime style image.
- Style
Image Missing Event - Style-image-missing event payload.
- Style
Image Options - Options for adding or replacing a runtime style image.
- Texture
Image Info - Tile
Action Event - Tile-action event payload.
- TileId
- Overscaled tile identity copied from a tile event payload.
- Tile
Source Options - Options for vector, raster, and raster DEM tile sources.
- Unit
Bezier - Cubic easing curve for animated camera transitions.
- Unknown
Runtime Event Payload - Unknown event payload preserved for forward compatibility.
- Vec3
- Three-component vector used by free camera options.
- Vulkan
Borrowed Texture Descriptor - Vulkan
Context Descriptor - Vulkan
Owned Texture Descriptor - Vulkan
Owned Texture Frame - Copied metadata for an acquired Vulkan session-owned texture frame.
- Vulkan
Owned Texture Frame Handle - RAII guard for an acquired Vulkan session-owned texture frame.
- Vulkan
Surface Descriptor - WglContext
Descriptor
Enums§
- Ambient
Cache Operation - Ambient cache maintenance operation for a runtime.
- Constrain
Mode - Map constraint modes used by viewport options.
- Error
Kind - Feature
Extension Result - Copied feature-extension query result.
- Feature
Identifier - GeoJSON feature identifier value.
- GeoJson
- Owned GeoJSON descriptor tree.
- Geometry
- Owned geometry descriptor.
- Json
Value - Owned JSON-like value tree used by style, GeoJSON, and copied native values.
- Location
Indicator Image Kind - Image-name property slots for location indicator layers.
- LogEvent
- Category for a MapLibre Native log record.
- LogSeverity
- Severity for a MapLibre Native log record.
- MapMode
- Map rendering mode used when creating a map.
- Network
Status - Process-global network reachability state used by MapLibre Native.
- North
Orientation - Map north orientation values used by viewport options.
- Offline
Operation Kind - Offline database operation kind reported by completion events.
- Offline
Operation Result Kind - Offline database operation result kind reported by completion events.
- Offline
Region Definition - Region descriptor used to create or inspect offline regions.
- Offline
Region Download State - Offline region download state copied from event payloads.
- OpenGL
Context Descriptor - Raster
DemEncoding - DEM raster encoding for raster DEM style sources.
- Render
Mode - Render mode reported by render observer events.
- Rendered
Query Geometry - Screen-space geometry used for rendered feature queries.
- Resource
Error Reason - Resource error reason copied from event payloads and used in resource responses.
- Resource
Kind - Network resource kind passed to resource callbacks.
- Resource
Loading Method - Resource loading method requested by MapLibre Native.
- Resource
Priority - Resource request priority.
- Resource
Provider Decision - Decision returned by a resource provider callback.
- Resource
Response Status - Status for a resource provider response.
- Resource
Storage Policy - Resource cache storage policy.
- Resource
Usage - Resource request usage.
- Runtime
Event Payload - Owned event payload copied from runtime-owned native storage.
- Runtime
Event Source - Source object that emitted a runtime event.
- Runtime
Event Type - Runtime event type.
- Source
Type - Style source type values returned by native style source metadata.
- Tile
LodMode - Tile LOD algorithms used by map tile options.
- Tile
Operation - Tile operation reported by tile observer events.
- Tile
Scheme - Tile URL coordinate scheme for vector, raster, and raster DEM sources.
- Vector
Tile Encoding - Vector tile encoding for vector style sources.
- Viewport
Mode - Viewport orientation modes used by viewport options.
Functions§
- c_
version - Returns the native C ABI contract version.
- clear_
log_ callback - Clears the process-global MapLibre Native log callback.
- lat_
lng_ for_ projected_ meters - Converts Spherical Mercator projected meters to a geographic coordinate.
- network_
status - Reads MapLibre Native’s process-global network status.
- projected_
meters_ for_ lat_ lng - Converts a geographic coordinate to Spherical Mercator projected meters.
- restore_
default_ async_ log_ severity_ mask - Restores MapLibre Native’s default async log severity mask.
- set_
async_ log_ severity_ mask - Configures severities that MapLibre Native may dispatch asynchronously.
- set_
log_ callback - Installs or replaces the process-global MapLibre Native log callback.
- set_
network_ status - Sets MapLibre Native’s process-global network status.
- supported_
opengl_ context_ providers - Returns the OpenGL context providers compiled into the linked native library.
- supported_
render_ backends - Returns the render backends compiled into the linked native library.