rustial-engine 0.0.1

Framework-agnostic 2.5D map engine for rustial
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
#![warn(missing_docs)]
#![cfg_attr(not(test), deny(clippy::unwrap_used))]
// ---------------------------------------------------------------------------
//! # rustial-engine
//!
//! Framework-agnostic 2.5D map engine for the [rustial](https://crates.io/crates/rustial)
//! geospatial library.
//!
//! This crate owns the **core logic** of the map: camera control, layer
//! management, tile fetching, terrain elevation, vector tessellation,
//! 3D model placement, and the per-frame update loop that produces a
//! [`FrameOutput`] consumed by renderers.
//!
//! ## Design principles
//!
//! | Principle | How it is enforced |
//! |-----------|--------------------|
//! | **No GPU code** | Zero dependency on `wgpu`, `bevy`, or any graphics API. Renderers live in separate crates. |
//! | **No windowing** | No `winit`, no event loop. Input arrives via [`InputEvent`] values pushed by the host. |
//! | **No async runtime** | Tile I/O uses a synchronous send/poll pattern ([`HttpClient`], [`TileSource`]) so the engine can be embedded anywhere. |
//! | **Thread-safe** | All public types are `Send + Sync`. [`MapState`] is designed to sit behind an `RwLock`. |
//! | **Precision** | Coordinates are `f64` (meters, WGS-84). Camera-relative rendering avoids f32 jitter at large Mercator values. |
//!
//! ## Module map
//!
//! | Module / File | Visibility | Purpose |
//! |---------------|------------|---------|
//! | [`camera`] | private | [`Camera`], [`CameraConstraints`], [`CameraController`], [`CameraMode`] |
//! | [`camera_animator`] | private | [`CameraAnimator`] -- smooth zoom, rotation, and pan momentum |
//! | [`geometry`] | private | OGC-style geometry model ([`Feature`], [`Geometry`], [`Polygon`], ...) |
//! | [`input`] | private | [`InputEvent`] enum (Pan, Zoom, Rotate, Resize) |
//! | [`interaction`] | **public** | Canonical interaction event and target types layered on top of picking |
//! | [`io`] | **public** | [`HttpClient`], [`HttpRequest`], [`HttpResponse`], [`SharedHttpClient`], [`FetchPool`], [`DiskCache`]* |
//! | [`layer`] | private | [`Layer`] trait + [`LayerId`] |
//! | [`layers`] | **public** | [`LayerStack`], [`TileLayer`], [`VectorLayer`], [`ModelLayer`] |
//! | [`map_state`] | private | [`MapState`], [`FrameOutput`] |
//! | [`models`] | **public** | [`ModelMesh`], [`ModelInstance`], [`AltitudeMode`] |
//! | [`simplify`] | private | Douglas-Peucker line simplification |
//! | [`terrain`] | **public** | [`TerrainManager`], [`TerrainConfig`], elevation sources, mesh building |
//! | [`tessellator`] | private | Polygon triangulation + thick-line stroking |
//! | [`tile_cache`] | private | LRU tile cache |
//! | [`tile_manager`] | private | Tile request scheduling with parent-tile fallback |
//! | [`tile_request_coordinator`] | private | Cross-source tile request coordination and global budget allocation |
//! | [`tile_source`] | private | [`TileSource`] trait, [`TileData`], [`TileDecoder`] |
//! | [`tile_source_http`] | private | [`HttpTileSource`] (URL-template HTTP fetcher) |
//! | [`geojson`] | **public*** | GeoJSON parser (behind the `geojson` feature flag) |
//! | [`style`] | **public** | Map style system -- layer configuration, paint, and update logic |
//! | [`symbols`] | **public** | Symbol and cartography foundation -- sprite atlases, placement, and collision |
//!
//! *Items marked with `*` require a Cargo feature flag.
//!
//! ## Feature flags
//!
//! | Flag | Default | Description |
//! |------|---------|-------------|
//! | `geojson` | off | Enables the GeoJSON parser ([`parse_geojson`]) and its `serde`/`serde_json` dependencies. |
//! | `shapefile` | off | Enables the Shapefile parser ([`parse_shapefile`]) and its `shapefile` dependency. |
//! | `gltf` | off | Enables [`ModelMesh::from_gltf`] for GLTF/GLB 3D model loading. |
//! | `obj` | off | Enables [`ModelMesh::from_obj`] for Wavefront OBJ 3D model loading. |
//! | `disk-cache` | off | Enables [`DiskCache`] for flat-file on-disk tile persistence. |
//!
//! ## Re-exported dependency
//!
//! This crate depends on [`glam`](https://docs.rs/glam) (workspace version)
//! for matrix and vector math. The `glam` types appear in public signatures
//! (e.g. [`FrameOutput::view_projection`] is a `glam::DMat4`). Downstream
//! crates that interact with these values should use the same `glam` version
//! declared in the workspace `Cargo.toml`.
// ---------------------------------------------------------------------------

// ---------------------------------------------------------------------------
// Modules
// ---------------------------------------------------------------------------

#[path = "math/bounds.rs"]
mod bounds;
#[path = "math/coord.rs"]
mod coord;
#[path = "math/elevation.rs"]
mod elevation;
#[path = "math/ellipsoid.rs"]
mod ellipsoid;
#[path = "math/equirectangular.rs"]
mod equirectangular;
#[path = "math/frustum.rs"]
mod frustum;
#[path = "math/geodesic.rs"]
mod geodesic;
#[path = "math/globe.rs"]
mod globe;
#[path = "math/mercator.rs"]
mod mercator;
#[path = "math/projection.rs"]
mod projection;
#[path = "math/tile.rs"]
mod tile;
#[path = "math/vertical_perspective.rs"]
mod vertical_perspective;

pub mod async_data;
mod camera;
mod camera_animator;
mod camera_projection;
pub mod cluster;
pub mod event_emitter;
pub mod expression;
pub(crate) mod geo_wrap;
#[cfg(feature = "geojson")]
pub mod geojson;
mod geometry;
pub mod geometry_ops;
pub mod gesture;
pub mod image_compare;
mod input;
pub mod interaction;
pub mod interaction_manager;
pub mod io;
mod layer;
pub mod layers;
pub mod loading_placeholder;
mod map_state;
pub mod models;
pub mod mvt;
pub mod picking;
mod pooled_tile_source;
pub mod query;
pub mod regression;
#[cfg(feature = "shapefile")]
pub mod shapefile_parser;
pub mod shapes;
mod simplify;
mod streamed_payload;
pub mod style;
#[cfg(feature = "style-json")]
pub mod style_json;
pub mod symbols;
pub mod terrain;
mod tessellator;
mod tile_cache;
mod tile_lifecycle;
mod tile_manager;
mod tile_request_coordinator;
mod tile_source;
mod tile_source_http;
mod tile_source_vector_http;
pub mod tilejson;
pub mod visualization;

pub mod precision_invariants;

#[cfg(test)]
mod support_contract;
#[cfg(test)]
mod visualization_contract;

pub extern crate self as rustial_math;

// ---------------------------------------------------------------------------
// Re-exports -- Math primitives
// ---------------------------------------------------------------------------

pub use bounds::{GeoBounds, WorldBounds};
pub use coord::{GeoCoord, WorldCoord};
pub use elevation::ElevationGrid;
pub use ellipsoid::Ellipsoid;
pub use equirectangular::Equirectangular;
pub use frustum::{
    Frustum, Plane, PLANE_BOTTOM, PLANE_FAR, PLANE_LEFT, PLANE_NEAR, PLANE_RIGHT, PLANE_TOP,
};
pub use geodesic::{
    geodesic_destination, geodesic_destination_on, geodesic_distance, geodesic_distance_on,
    GeodesicResult, VincentyConvergenceError,
};
pub use globe::Globe;
pub use mercator::WebMercator;
pub use projection::Projection;
pub use tile::{
    geo_to_tile, geo_to_tile_checked, tile_bounds_world, tile_to_geo, tile_xy_to_geo,
    visible_tiles, visible_tiles_checked, visible_tiles_covering, visible_tiles_flat_view,
    visible_tiles_flat_view_capped, visible_tiles_flat_view_capped_with_config,
    visible_tiles_flat_view_refined_capped, visible_tiles_flat_view_refined_capped_with_config,
    visible_tiles_flat_view_with_config, visible_tiles_frustum, visible_tiles_lod, CoveringCamera,
    CoveringTilesOptions, FlatTileSelectionConfig, FlatTileView, TileCoord, TileId, MAX_ZOOM,
};
pub use vertical_perspective::VerticalPerspective;

// ---------------------------------------------------------------------------
// Re-exports -- Camera & Input
// ---------------------------------------------------------------------------

pub use camera::{Camera, CameraConstraints, CameraController, CameraMode};
pub use camera_animator::{CameraAnimator, EaseToOptions, FlyToOptions};
pub use camera_projection::CameraProjection;
pub use input::{InputEvent, TouchContact, TouchPhase};
pub use interaction::{
    InteractionButton, InteractionEvent, InteractionEventKind, InteractionModifiers,
    InteractionTarget, InteractionTargetKind, PointerKind, ScreenPoint,
};
pub use interaction_manager::{InteractionConfig, InteractionManager};

// ---------------------------------------------------------------------------
// Re-exports -- Layer system
// ---------------------------------------------------------------------------

pub use expression::{
    BoolExpression, ExprEvalContext, Expression, NumericExpression, StringExpression,
};
pub use layer::{Layer, LayerId, LayerKind};
pub use layers::{
    BackgroundLayer, CallbackFrameProvider, CircleInstanceData, DynamicImageOverlayLayer,
    FrameData, FrameProvider, FrameProviderFactory, HillshadeLayer, HillshadeParams,
    ImageOverlayData, ImageOverlayLayer, LayerStack, ModelLayer, PatternImage, TileLayer,
    VectorLayer, VectorMeshData, VectorRenderMode, VectorStyle,
};
pub use style::{
    atmospheric_clear_color,
    // Feature-state-driven style resolution helpers.
    circle_style_with_state,
    compute_fog,
    compute_lighting,
    compute_shadow_cascades,
    compute_sky,
    fill_extrusion_style_with_state,
    fill_style_with_state,
    heatmap_style_with_state,
    line_style_with_state,
    symbol_style_with_state,
    vector_style_with_state,
    AmbientLight,
    BackgroundStyleLayer,
    CanvasSource,
    CircleStyleLayer,
    ComputedFog,
    ComputedLighting,
    ComputedShadow,
    ComputedSky,
    DirectionalLight,
    FillExtrusionStyleLayer,
    FillStyleLayer,
    // Fog / atmosphere configuration.
    FogConfig,
    FromFeatureStateProperty,
    GeoJsonSource,
    HeatmapStyleLayer,
    HillshadeStyleLayer,
    ImageSource,
    LayerTransitionState,
    // Lighting configuration.
    LightConfig,
    LightingMode,
    LineStyleLayer,
    MapStyle,
    ModelSource,
    ModelStyleLayer,
    RasterSource,
    RasterStyleLayer,
    ResolvedTransitions,
    // Shadow map configuration.
    ShadowConfig,
    // Sky / atmosphere configuration.
    SkyConfig,
    SkyType,
    StyleDocument,
    StyleError,
    StyleEvalContext,
    StyleEvalContextFull,
    StyleLayer,
    StyleLayerId,
    StyleLayerMeta,
    StyleProjection,
    StyleSource,
    StyleSourceId,
    StyleSourceKind,
    StyleValue,
    SymbolStyleLayer,
    TerrainSource,
    // Style transition types.
    TransitionSpec,
    Transitioning,
    VectorStyleLayer,
    VectorTileSource,
    VideoSource,
};
#[cfg(feature = "style-json")]
pub use style_json::{
    parse_style_json, StyleSourceRegistry, StyleSpecDocument, StyleSpecError, StyleSpecLayer,
    StyleSpecLayerType, StyleSpecProjection, StyleSpecProjectionType, StyleSpecSource,
    StyleSpecSourceType, StyleSpecTerrain, StyleSpecTransition,
};

// ---------------------------------------------------------------------------
// Re-exports -- Map state & frame output
// ---------------------------------------------------------------------------

pub use event_emitter::{EventEmitter, ListenerId};
pub use loading_placeholder::{LoadingPlaceholder, PlaceholderGenerator, PlaceholderStyle};
pub use map_state::{
    FitBoundsOptions, FitBoundsPadding, FrameOutput, MapState, TilePipelineDiagnostics,
};
pub use regression::{
    TilePipelineRegressionEvaluation, TilePipelineRegressionParseError,
    TilePipelineRegressionSample, TilePipelineRegressionSummary, TilePipelineRegressionThresholds,
    TilePipelineRegressionViolation, TILE_PIPELINE_REGRESSION_CSV_HEADER,
};

// ---------------------------------------------------------------------------
// Re-exports -- Geometry & vector data
// ---------------------------------------------------------------------------

pub use geometry::{
    Feature, FeatureCollection, Geometry, LineString, MultiLineString, MultiPoint, MultiPolygon,
    Point, Polygon, PropertyValue,
};

pub use cluster::{ClusterOptions, PointCluster};
pub use gesture::GestureRecognizer;

#[cfg(feature = "geojson")]
pub use geojson::{parse_geojson, GeoJsonError};

#[cfg(feature = "shapefile")]
pub use shapefile_parser::{parse_shapefile, ShapefileError};

pub use geometry_ops::{
    bearing, geometry_bbox, geometry_centroid, initial_bearing, interpolate_great_circle,
    linestring_length, polygon_area, ring_area,
};
pub use simplify::{simplify_douglas_peucker, simplify_polygon_ring};
pub use tessellator::{
    stroke_line, stroke_line_styled, triangulate_polygon, triangulate_polygon_with_holes,
    StrokeLineResult,
};

// ---------------------------------------------------------------------------
// Re-exports -- Tile engine
// ---------------------------------------------------------------------------

pub use pooled_tile_source::{
    PooledRasterTileSourceConfig, PooledTileSource, DEFAULT_RASTER_TILE_URL,
    DEFAULT_RASTER_TILE_USER_AGENT,
};
pub use tile_cache::{TileCache, TileCacheEntry, TileCacheStats};
pub use tile_lifecycle::{
    TileLifecycleDiagnostics, TileLifecycleEvent, TileLifecycleEventKind, TileLifecycleRecord,
};
pub use tile_manager::{
    TileManager, TileManagerCounters, TilePixelRect, TileSelectionConfig, TileSelectionStats,
    TileTextureRegion, VisibleTile, VisibleTileSet,
};
pub use tile_request_coordinator::{
    CoordinatorConfig, CoordinatorStats, SourcePriority, TileRequestCoordinator,
};
pub use tile_source::{
    DecodedImage, RasterMipChain, RasterMipLevel, RawVectorPayload, RevalidationHint, TileData,
    TileDecoder, TileError, TileFreshness, TileResponse, TileSource, TileSourceDiagnostics,
    TileSourceFailureDiagnostics, VectorTileData,
};
pub use tile_source_http::HttpTileSource;
pub use tile_source_vector_http::HttpVectorTileSource;

// ---------------------------------------------------------------------------
// Re-exports -- I/O
// ---------------------------------------------------------------------------

pub use io::{FetchPool, HttpClient, HttpRequest, HttpResponse, SharedHttpClient};

#[cfg(all(feature = "disk-cache", not(target_arch = "wasm32")))]
pub use io::{DiskCache, DiskCacheError};

// ---------------------------------------------------------------------------
// Re-exports -- Terrain & elevation
// ---------------------------------------------------------------------------

pub use terrain::{
    build_terrain_descriptor, build_terrain_descriptor_with_source, build_terrain_mesh,
    build_terrain_mesh_with_source, elevation_region_in_texture_space, expand_with_clamped_border,
    interior_dims, materialize_terrain_mesh, patch_border_edge, patch_changed_tiles,
    prepare_hillshade_raster, skirt_height, BackfillState, ElevationSource,
    ElevationSourceDiagnostics, ElevationSourceFailureDiagnostics, FlatElevationSource,
    HttpElevationSource, PreparedHillshadeRaster, QuantizedMeshSource, TerrainConfig,
    TerrainDiagnostics, TerrainElevationTexture, TerrainError, TerrainManager, TerrainMeshData,
    TerrainRgbEncoding, NEIGHBOR_OFFSETS,
};

// ---------------------------------------------------------------------------
// Re-exports -- 3D models
// ---------------------------------------------------------------------------

pub use models::{AltitudeMode, ModelInstance, ModelLoadError, ModelMesh};

// ---------------------------------------------------------------------------
// Re-exports -- Symbols and cartography foundation
// ---------------------------------------------------------------------------

pub use symbols::{
    cross_tile_index::{CrossTileSymbolIndex, SymbolCandidateEntry},
    layout_symbol_glyphs, GlyphAtlas, GlyphAtlasEntry, GlyphKey, GlyphProvider, GlyphQuad,
    GlyphRaster, ImageManager, PlacedSymbol, ProceduralGlyphProvider, SpriteImage, SpriteSheet,
    SymbolAnchor, SymbolAssetDependencies, SymbolAssetRegistry, SymbolCandidate,
    SymbolCollisionBox, SymbolIconTextFit, SymbolPlacement, SymbolPlacementConfig,
    SymbolPlacementEngine, SymbolTextJustify, SymbolTextTransform, SymbolWritingMode,
};

// ---------------------------------------------------------------------------
// Re-exports -- Query API
// ---------------------------------------------------------------------------

pub use query::{
    geometry_intersects_bbox, FeatureState, FeatureStateId, GeoBBox, QueriedFeature, QueryOptions,
};

// ---------------------------------------------------------------------------
// Re-exports -- Picking API
// ---------------------------------------------------------------------------

pub use picking::{
    HitCategory, HitProvenance, NonPickableLayerKind, PickHit, PickOptions, PickQuery, PickResult,
    PickableLayerKind,
};

// ---------------------------------------------------------------------------
// Re-exports -- Visualization primitives
// ---------------------------------------------------------------------------

pub use visualization::{
    ColorRamp, ColorStop, ColumnInstance, ColumnInstanceSet, ExtrusionParams, GeoGrid,
    GridExtrusionLayer, GridScalarLayer, InstancedColumnLayer, LabeledStop, LegendSpec,
    NormalizationMode, PointCloudLayer, PointInstance, PointInstanceSet, ScalarField2D,
    VisualizationOverlay,
};

// ---------------------------------------------------------------------------
// Re-exports -- Image comparison (cross-renderer parity)
// ---------------------------------------------------------------------------

pub use image_compare::{compute_rmse, count_differing_pixels, differing_pixel_fraction};

// ---------------------------------------------------------------------------
// Re-exports -- TileJSON metadata
// ---------------------------------------------------------------------------

#[cfg(feature = "style-json")]
pub use tilejson::{parse_tilejson, parse_tilejson_value};
pub use tilejson::{TileJson, TileJsonError, TileScheme, VectorLayerMeta};

// ---------------------------------------------------------------------------
// Re-exports -- MVT decoder
// ---------------------------------------------------------------------------

pub use mvt::{decode_mvt, DecodedVectorTile, MvtDecodeOptions, MvtError};

// ---------------------------------------------------------------------------
// Re-exports -- Async data pipeline
// ---------------------------------------------------------------------------

pub use async_data::{
    partition_features_by_tile, AsyncVisualizationPipeline, DataTaskPool, DataTaskResultReceiver,
    MvtDecodeOutput, TerrainCacheKey, TerrainTaskInput, TerrainTaskOutput, ThreadDataTaskPool,
    VectorBucketKey, VectorCacheKey, VectorTaskInput, VectorTaskOutput, VisualizationTaskOutput,
};

// ---------------------------------------------------------------------------
// Compile-time Send + Sync assertions
//
// Every public data type that downstream code may share across threads
// must be Send + Sync.  These zero-cost assertions catch regressions at
// compile time rather than in production.
// ---------------------------------------------------------------------------

#[allow(dead_code)]
const _: () = {
    fn assert_send_sync<T: Send + Sync>() {}
    fn assertions() {
        // Math primitives
        assert_send_sync::<GeoCoord>();
        assert_send_sync::<WorldCoord>();
        assert_send_sync::<GeoBounds>();
        assert_send_sync::<WorldBounds>();
        assert_send_sync::<Ellipsoid>();
        assert_send_sync::<Frustum>();
        assert_send_sync::<Plane>();
        assert_send_sync::<TileId>();
        assert_send_sync::<TileCoord>();
        assert_send_sync::<FlatTileSelectionConfig>();
        assert_send_sync::<FlatTileView>();
        assert_send_sync::<CoveringCamera>();
        assert_send_sync::<CoveringTilesOptions>();
        assert_send_sync::<GeodesicResult>();
        assert_send_sync::<ElevationGrid>();
        assert_send_sync::<VincentyConvergenceError>();
        assert_send_sync::<WebMercator>();
        assert_send_sync::<Equirectangular>();
        assert_send_sync::<Globe>();
        assert_send_sync::<VerticalPerspective>();

        // Camera & input
        assert_send_sync::<Camera>();
        assert_send_sync::<CameraConstraints>();
        assert_send_sync::<CameraMode>();
        assert_send_sync::<CameraProjection>();
        assert_send_sync::<CameraAnimator>();
        assert_send_sync::<InputEvent>();

        // Layer system
        assert_send_sync::<BackgroundLayer>();
        assert_send_sync::<HillshadeLayer>();
        assert_send_sync::<LayerId>();
        assert_send_sync::<LayerStack>();
        assert_send_sync::<TileLayer>();
        assert_send_sync::<VectorLayer>();
        assert_send_sync::<ModelLayer>();
        assert_send_sync::<VectorStyle>();
        assert_send_sync::<VectorMeshData>();
        assert_send_sync::<StyleDocument>();
        assert_send_sync::<MapStyle>();

        // Map state
        assert_send_sync::<MapState>();
        assert_send_sync::<FrameOutput>();
        assert_send_sync::<FeatureState>();
        assert_send_sync::<FeatureStateId>();
        assert_send_sync::<QueriedFeature>();
        assert_send_sync::<QueryOptions>();

        // Picking
        assert_send_sync::<PickQuery>();
        assert_send_sync::<PickOptions>();
        assert_send_sync::<PickHit>();
        assert_send_sync::<PickResult>();

        // Geometry
        assert_send_sync::<Feature>();
        assert_send_sync::<FeatureCollection>();
        assert_send_sync::<Geometry>();
        assert_send_sync::<PropertyValue>();

        // Tile engine
        assert_send_sync::<TileCache>();
        assert_send_sync::<TileCacheEntry>();
        assert_send_sync::<TileCacheStats>();
        assert_send_sync::<TileManager>();
        assert_send_sync::<TileManagerCounters>();
        assert_send_sync::<TilePixelRect>();
        assert_send_sync::<TileSelectionConfig>();
        assert_send_sync::<TileSelectionStats>();
        assert_send_sync::<TilePipelineDiagnostics>();
        assert_send_sync::<TileTextureRegion>();
        assert_send_sync::<VisibleTile>();
        assert_send_sync::<VisibleTileSet>();
        assert_send_sync::<DecodedImage>();
        assert_send_sync::<RasterMipChain>();
        assert_send_sync::<RasterMipLevel>();
        assert_send_sync::<TileData>();
        assert_send_sync::<TileError>();
        assert_send_sync::<TileSourceDiagnostics>();
        assert_send_sync::<PooledTileSource>();
        assert_send_sync::<VectorTileData>();

        // TileJSON
        assert_send_sync::<TileJson>();
        assert_send_sync::<TileJsonError>();
        assert_send_sync::<TileScheme>();
        assert_send_sync::<VectorLayerMeta>();

        // MVT
        assert_send_sync::<MvtDecodeOptions>();
        assert_send_sync::<MvtError>();

        // I/O
        assert_send_sync::<FetchPool>();
        assert_send_sync::<HttpRequest>();
        assert_send_sync::<HttpResponse>();

        // Terrain
        assert_send_sync::<TerrainConfig>();
        assert_send_sync::<TerrainError>();
        assert_send_sync::<TerrainManager>();
        assert_send_sync::<TerrainMeshData>();
        assert_send_sync::<PreparedHillshadeRaster>();
        assert_send_sync::<TerrainRgbEncoding>();
        assert_send_sync::<TerrainSource>();
        assert_send_sync::<VectorTileSource>();
        assert_send_sync::<ImageSource>();
        assert_send_sync::<VideoSource>();
        assert_send_sync::<CanvasSource>();
        assert_send_sync::<GlyphAtlas>();
        assert_send_sync::<GlyphAtlasEntry>();
        assert_send_sync::<GlyphKey>();
        assert_send_sync::<GlyphRaster>();
        assert_send_sync::<ImageManager>();
        assert_send_sync::<PlacedSymbol>();
        assert_send_sync::<ProceduralGlyphProvider>();
        assert_send_sync::<SpriteImage>();
        assert_send_sync::<SpriteSheet>();
        assert_send_sync::<SymbolAnchor>();
        assert_send_sync::<SymbolAssetDependencies>();
        assert_send_sync::<SymbolAssetRegistry>();
        assert_send_sync::<SymbolCandidate>();
        assert_send_sync::<SymbolCollisionBox>();
        assert_send_sync::<SymbolPlacementConfig>();
        assert_send_sync::<SymbolPlacementEngine>();
        assert_send_sync::<SymbolWritingMode>();

        // Models
        assert_send_sync::<ModelInstance>();
        assert_send_sync::<ModelMesh>();
        assert_send_sync::<AltitudeMode>();
        assert_send_sync::<GeoJsonSource>();
        assert_send_sync::<ModelSource>();

        // Visualization
        assert_send_sync::<GeoGrid>();
        assert_send_sync::<ScalarField2D>();
        assert_send_sync::<ColorRamp>();
        assert_send_sync::<ColorStop>();
        assert_send_sync::<LegendSpec>();
        assert_send_sync::<ColumnInstance>();
        assert_send_sync::<ColumnInstanceSet>();
        assert_send_sync::<PointInstance>();
        assert_send_sync::<PointInstanceSet>();
        assert_send_sync::<GridScalarLayer>();
        assert_send_sync::<GridExtrusionLayer>();
        assert_send_sync::<InstancedColumnLayer>();
        assert_send_sync::<PointCloudLayer>();
        assert_send_sync::<VisualizationOverlay>();
    }
};