Expand description
§arcgis
A type-safe Rust SDK for the ArcGIS REST API.
This library provides strongly-typed interfaces to ArcGIS services with compile-time guarantees. Instead of error-prone string constants, it uses Rust enums and newtypes to make invalid states unrepresentable.
§Features
- 🔒 Type-safe: Enums instead of strings - compile-time validation
- 🌍 GeoRust integration: Native
geo-typessupport - 🔐 Authentication: API Key and OAuth 2.0
- ⚡ Async/await: Built on
tokioandreqwest - 🎯 Modular: Optional services via Cargo features
§Quick Start
use arcgis::{ApiKeyAuth, ArcGISClient};
#[tokio::main]
async fn main() -> Result<(), arcgis::Error> {
let auth = ApiKeyAuth::new("YOUR_API_KEY");
let client = ArcGISClient::new(auth);
// Use the client to access ArcGIS services
Ok(())
}§Type Safety
This SDK enforces type safety throughout:
use arcgis::{GeometryType, SpatialRel};
// ✅ Compile-time validated
let geom_type = GeometryType::Point;
let spatial_rel = SpatialRel::Intersects;
// ❌ Won't compile
// let geom_type = "esriGeometryPoint"; // Wrong type!Re-exports§
Structs§
- AddAttachment
Result - Result of adding an attachment.
- AddItem
Params - Parameters for adding a new item to the portal.
- AddItem
Result - Result from adding an item.
- Address
Candidate - A candidate address returned from geocoding.
- Alter
Response - Response from alter operation.
- Alter
Version Params - Parameters for altering an existing version’s properties.
- ApiKey
Auth - API Key authentication provider.
- ArcGIS
Client - The main client for interacting with ArcGIS services.
- ArcGIS
Envelope - ArcGIS Envelope (bounding box) geometry.
- ArcGIS
Multipoint - ArcGIS Multipoint geometry.
- ArcGIS
Point - ArcGIS Point geometry.
- ArcGIS
Polygon - ArcGIS Polygon geometry.
- ArcGIS
Polyline - ArcGIS Polyline geometry.
- Areas
AndLengths Parameters - Parameters for calculating areas and lengths.
- Areas
AndLengths Parameters Builder - Builder for
AreasAndLengthsParameters. - Areas
AndLengths Result - Response from areas and lengths calculation.
- Attachment
Id - Attachment ID for a feature attachment.
- Attachment
Info - Information about a feature attachment.
- Attachment
Infos Response - Response from querying attachments.
- Batch
Candidate Result - Candidates for a single address in batch processing.
- Batch
Candidates Response - Response from batch findAddressCandidates.
- Batch
Geocode Response - Response from batch geocoding (geocodeAddresses).
- Batch
Location - A single result from batch geocoding.
- Buffer
Parameters - Parameters for the buffer operation.
- Buffer
Parameters Builder - Builder for
BufferParameters. - Buffer
Result - Response from buffer operation.
- Builder
Error - Builder error wrapper for derive_builder errors.
- Categories
Result - Category listing result.
- Category
Info - Detailed category information.
- Class
Break Info - Information about a classification break.
- Client
Credentials Auth - OAuth 2.0 Client Credentials authentication provider.
- Closest
Facility Parameters - Parameters for closest facility calculation.
- Closest
Facility Parameters Builder - Builder for
ClosestFacilityParameters. - Closest
Facility Result - Result from closest facility calculation.
- Coded
Value - A coded value in a domain.
- Conflict
Entry - A conflict entry for a specific feature.
- Conflict
Feature - Feature state at a specific version in a conflict.
- Conflicts
Response - Response from conflicts operation.
- Create
Group Params - Parameters for creating a new group.
- Create
Service Params - Parameters for creating a new hosted feature service.
- Create
Service Result - Result from creating a service.
- Create
Version Params - Parameters for creating a new version.
- Create
Version Response - Response from create operation.
- DayHours
- Operating hours for a specific day.
- Delete
Attachment Result - Individual result for a single attachment deletion.
- Delete
Attachments Response - Response from deleting attachments.
- Delete
Forward Edits Response - Response from delete forward edits operation.
- Delete
Item Result - Result from deleting an item.
- Delete
Response - Response from delete operation.
- Delete
Service Result - Result from deleting a service.
- Difference
Feature - Feature data for a difference entry.
- Differences
Response - Response from differences operation.
- Distance
Parameters - Parameters for distance calculation.
- Distance
Parameters Builder - Builder for
DistanceParameters. - Distance
Result - Response from distance calculation.
- Domain
- A coded value domain.
- Edit
Error - Error details for a failed edit operation.
- Edit
Options - Options for controlling edit behavior.
- Edit
Result - Result of an edit operation (add, update, or delete).
- Edit
Result Item - Individual result for a single feature edit.
- Edit
Session Error - Error information from edit session operations.
- Elevation
Client - Client for interacting with ArcGIS Elevation Services.
- EnvConfig
- Environment configuration for ArcGIS SDK.
- EnvError
- Environment variable error wrapper.
- Error
- The main error type for the ArcGIS SDK.
- Export
Extent - Extent returned in export response.
- Export
Image Parameters - Parameters for exporting an image.
- Export
Image Parameters Builder - Builder for
ExportImageParameters. - Export
Image Result - Result from exporting an image.
- Export
MapBuilder - A fluent builder for constructing and executing map export operations.
- Export
MapParams - Parameters for exporting a map image.
- Export
MapParams Builder - Builder for
ExportMapParams. - Export
MapResponse - Response from export map operation (JSON format).
- Extent
- Bounding box extent.
- Feature
- A single feature returned from a feature service.
- Feature
Query Params - Parameters for querying features from a feature service.
- Feature
Query Params Builder - Builder for
FeatureQueryParams. - Feature
Service Client - Client for interacting with an ArcGIS Feature Service.
- Feature
Set - A set of features returned from a query.
- Feature
Statistics Response - Response from a feature statistics query.
- Field
Calculation - Field calculation expression for calculateRecords operation.
- Find
Params - Parameters for the find operation.
- Find
Params Builder - Builder for
FindParams. - Find
Response - Response from find operation.
- Find
Result - A single find result.
- Font
Stack - A font stack name (e.g., “Arial Regular”, “Noto Sans Bold”).
- GPBoolean
- A boolean parameter value.
- GPData
File - A data file parameter.
- GPDate
- A date parameter value (milliseconds since epoch).
- GPDouble
- A double (floating point) parameter value.
- GPExecute
Result - Result from a geoprocessing execution.
- GPFeature
Record SetLayer - A feature record set layer parameter (GeoJSON-like features).
- GPJob
Info - Information about an asynchronous geoprocessing job.
- GPLinear
Unit - A linear unit parameter (distance with unit).
- GPLong
- A long (integer) parameter value.
- GPMessage
- A message from geoprocessing execution.
- GPRaster
Data Layer - A raster data layer parameter.
- GPResult
Parameter - A geoprocessing result parameter.
- GPString
- A string parameter value.
- Generate
KmlParams - Parameters for generating KML output.
- Generate
KmlParams Builder - Builder for
GenerateKmlParams. - Generate
Renderer Params - Parameters for generating a classification renderer.
- Generate
Renderer Params Builder - Builder for
GenerateRendererParams. - Geocode
Address - Address information from reverse geocoding.
- Geocode
Response - Response from findAddressCandidates operation.
- Geocode
Service Client - Client for interacting with an ArcGIS Geocoding Service.
- Geometry
Service Client - Client for interacting with an ArcGIS Geometry Service.
- Geoprocessing
Service Client - Client for interacting with ArcGIS Geoprocessing Services (GPServer).
- Glyph
Range - A glyph range for font characters (e.g., 0-255).
- Group
Info - Group information from portal.
- Group
Membership - Group membership information.
- Group
Result - Generic result for group operations.
- Group
Search Parameters - Parameters for searching groups.
- Group
Search Result - Search result for groups.
- Histogram
Parameters - Parameters for histogram computation.
- Histogram
Parameters Builder - Builder for
HistogramParameters. - Histogram
Result - Result from histogram computation.
- Http
Error - HTTP request error wrapper.
- Identify
Parameters - Parameters for identify operation.
- Identify
Parameters Builder - Builder for
IdentifyParameters. - Identify
Params - Parameters for identifying features on a map.
- Identify
Params Builder - Builder for
IdentifyParams. - Identify
Response - Response from identify operation.
- Identify
Result - A single identified feature.
- Image
Identify Result - Result from identify operation.
- Image
Service Client - Client for interacting with ArcGIS Image Services (ImageServer).
- Inspect
Conflict Feature - Specification for inspecting a specific feature conflict.
- Inspect
Conflict Layer - Specification for inspecting conflicts in a specific layer.
- Inspect
Conflicts Response - Response from inspect conflicts operation.
- IoError
- File I/O error wrapper.
- Item
Info - Portal item information.
- Json
Error - JSON serialization/deserialization error wrapper.
- Layer
Conflicts - Conflicts for a specific layer.
- Layer
Definitions - Builder for layer definition expressions.
- Layer
Domain Info - Domain information for a single layer.
- Layer
Feature Differences - Feature differences for a specific layer.
- LayerId
- Layer ID within a feature or map service.
- Layer
Legend - Legend information for a single layer.
- Layer
Object IdDifferences - Object ID differences for a specific layer.
- Legend
Response - Response from legend operation.
- Legend
Symbol - Symbol in a layer legend.
- Level
OfDetail - A level of detail in a tile cache.
- MapService
Client - Client for interacting with an ArcGIS Map Service.
- MapService
Metadata - Map service metadata.
- Mosaic
Rule - Mosaic rule for combining multiple rasters.
- NALocation
- A location for network analysis operations.
- NoAuth
- No authentication provider for accessing public ArcGIS services.
- ODCost
Matrix Parameters - Parameters for origin-destination cost matrix calculation.
- ODCost
Matrix Parameters Builder - Builder for
ODCostMatrixParameters. - ODCost
Matrix Result - Result from origin-destination cost matrix calculation.
- Object
Id - Object ID for a feature.
- Overwrite
Parameters - Parameters for overwriting a service.
- Overwrite
Result - Result from overwriting a service.
- Partial
Post Row - Specifies a subset of edits to post for partial post operations.
- Place
Address - Place address information.
- Place
Category - Place category information.
- Place
Contact Info - Place contact information.
- Place
Details Result - Detailed place information result.
- Place
Hours - Place operating hours.
- Place
Info - Information about a place (point of interest).
- Place
Rating - Place rating information.
- Place
Search Parameters - Parameters for searching places near a point.
- Place
Search Parameters Builder - Builder for
PlaceSearchParameters. - Place
Search Result - Result from place search operation.
- Places
Client - Client for interacting with ArcGIS Places Service.
- Portal
Client - Client for interacting with ArcGIS Portal (ArcGIS Online or Portal for ArcGIS).
- Post
Response - Response from post operation.
- Profile
Parameters - Parameters for generating an elevation profile.
- Profile
Parameters Builder - Builder for
ProfileParameters. - Profile
Result - Result from elevation profile operation.
- Project
Parameters - Parameters for the project operation.
- Project
Parameters Builder - Builder for
ProjectParameters. - Project
Result - Response from project operation.
- Publish
Parameters - Parameters for publishing a hosted service.
- Publish
Result - Result from publishing a service.
- Publish
Status - Status of a publishing job.
- Query
Builder - A fluent builder for constructing and executing feature queries.
- Query
Domains Response - Response from queryDomains operation.
- Raster
Info - Raster information metadata.
- Reconcile
Response - Response from reconcile operation.
- Related
Record Group - A group of related records for a specific source object ID.
- Related
Records Params - Parameters for querying related records.
- Related
Records Params Builder - Builder for
RelatedRecordsParams. - Related
Records Response - Response from a query related records operation.
- Renderer
Response - Response from generateRenderer operation.
- Rendering
Rule - Rendering rule for dynamic visualization.
- Restore
Rows Layer - Specification for restoring rows in a specific layer.
- Restore
Rows Response - Response from restore rows operation.
- Reverse
Geocode Response - Response from reverseGeocode operation.
- Route
Parameters - Parameters for route calculation.
- Route
Parameters Builder - Builder for
RouteParameters. - Route
Result - Result from route calculation.
- Routing
Service Client - Client for interacting with an ArcGIS Routing Service (Network Analyst Server).
- Sample
Parameters - Parameters for sampling operation.
- Sample
Parameters Builder - Builder for
SampleParameters. - Sample
Result - Result from sampling operation.
- Search
Parameters - Search parameters for portal items.
- Search
Result - Search result from portal.
- Service
Area Parameters - Parameters for service area calculation.
- Service
Area Parameters Builder - Builder for
ServiceAreaParameters. - Service
Area Result - Result from service area calculation.
- Service
Layer - Layer information in service metadata.
- Session
Id - A session identifier for edit operations.
- Share
Item Result - Result from sharing an item.
- Sharing
Parameters - Parameters for sharing an item.
- Simplify
Parameters - Parameters for the simplify operation.
- Simplify
Parameters Builder - Builder for
SimplifyParameters. - Simplify
Result - Response from simplify operation.
- Start
Editing Response - Response from startEditing operation.
- Start
Reading Response - Response from startReading operation.
- Statistic
Definition - Defines a field-based statistic to calculate.
- Stop
Editing Response - Response from stopEditing operation.
- Stop
Reading Response - Response from stopReading operation.
- Subtype
- Subtype information.
- Suggest
Response - Response from suggest operation.
- Suggestion
- Suggestion from autocomplete/suggest operation.
- Summarize
Elevation Parameters - Parameters for summarizing elevation within a polygon.
- Summarize
Elevation Parameters Builder - Builder for
SummarizeElevationParameters. - Summarize
Elevation Result - Result from summarize elevation operation.
- Tile
Coordinate - Tile coordinate for tile requests.
- Tile
Info - Tile cache information.
- TopFeatures
Params - Parameters for querying top features from a feature service layer.
- TopFeatures
Params Builder - Builder for
TopFeaturesParams. - TopFilter
- Top filter specification for queryTopFeatures operations.
- Transformation
- Datum transformation information.
- Truncate
Result - Response from truncate operation.
- Union
Parameters - Parameters for the union operation.
- Union
Parameters Builder - Builder for
UnionParameters. - Union
Result - Response from union operation.
- Unique
Value Info - Information about a unique value.
- Unshare
Item Result - Result from unsharing an item.
- Update
Attachment Result - Result of updating an attachment.
- Update
Group Params - Parameters for updating an existing group.
- Update
Item Params - Parameters for updating an existing item.
- Update
Item Result - Result from updating an item.
- Update
Service Definition Params - Parameters for updating a service definition.
- Update
Service Definition Result - Result from updating a service definition.
- UrlEncoded
Error - URL-encoded form serialization error wrapper.
- UrlError
- URL parsing error wrapper.
- User
Info - Information about a portal user.
- Vector
Tile Service Client - Client for interacting with ArcGIS Vector Tile Services.
- Vector
Tile Style - A Mapbox GL style document.
- Version
Guid - A version identifier (GUID).
- Version
Info - Information about a version.
- Version
Infos Response - Response from versionInfos operation (list all versions).
- Version
Management Client - Client for interacting with an ArcGIS Version Management Service.
- Viewshed
Parameters - Parameters for viewshed analysis.
- Viewshed
Parameters Builder - Builder for
ViewshedParameters. - Viewshed
Result - Result from viewshed analysis.
Enums§
- ArcGIS
Geometry - Union type for all ArcGIS geometry types.
- Area
Unit - Area units for measurements.
- Attachment
Source - Source for attachment file data.
- Barrier
Type - Type of barrier.
- Calculation
Type - Calculation type for geometric operations.
- Category
- Category for filtering geocoding results.
- Conflict
Detection - Conflict detection type for reconcile operations.
- Curb
Approach - Curb approach for navigating to a location.
- DemResolution
- DEM resolution options.
- Difference
Result Type - Result type for differences operation.
- Directions
Length - Directions length units.
- Directions
Style - Directions style.
- Directions
Time Attribute - Directions time attribute.
- Download
Result - Result of downloading an attachment.
- Download
Target - Target for attachment download.
- Error
Kind - Specific error conditions for the ArcGIS SDK.
- Export
Result - Result of a map export operation.
- Export
Target - Target for map export output.
- GPJob
Status - Status of an asynchronous geoprocessing job.
- GPMessage
Type - Type of geoprocessing message.
- GPParameter
- A geoprocessing parameter value.
- Geometry
Type - ArcGIS geometry types.
- Group
Membership Type - User’s membership type in a group.
- Image
Format - Image format for exported maps.
- Impedance
Attribute - Impedance attribute for cost calculation.
- Interpolation
Type - Interpolation type for resampling.
- Layer
Operation - Layer visibility operations.
- Layer
Selection - Which layers to identify in an identify operation.
- Linear
Unit - Linear units for distance measurements and buffers.
- Location
Type - Location type for geocoding results.
- Output
Line - Output line type for routes.
- Pixel
Type - Pixel type for raster data.
- Response
Format - Response format for feature service queries.
- Restriction
Attribute - Restriction attribute for routing.
- Route
Shape - Shape type for route geometry.
- Sort
Order - Sort order for search results.
- Spatial
Reference - Spatial reference for ArcGIS geometries.
- Spatial
Rel - Spatial relationship types for queries.
- Statistic
Type - Statistical operation type for aggregate queries.
- Time
Relation - Time relationship for temporal queries.
- Travel
Direction - Travel direction for analysis.
- Travel
Mode - Travel mode for routing.
- UTurn
Policy - U-turn policy at junctions.
- Version
Permission - Access permission level for a version.
- Versioning
Type - Versioning type for a geodatabase.
Traits§
- Auth
Provider - Trait for authentication providers.