rover_nexus_core 0.2.0

Wire-format message types (Cap'n Proto + JSON) for communication between robotic vehicles and a robot orchestration server: Rover Nexus
Documentation
// Copyright 2026 Rottinghaus Dynamics
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// features_query.rs
//! Rust domain types for feature query messages.

use serde::{Deserialize, Serialize};

use crate::core_model::Feature;
/// Feature kind for querying stored features
#[derive(Debug, Clone, Copy, PartialEq, Eq, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub enum QueryFeatureKind {
    Route,
    Shape,
}

/// Reference to a feature by ID and kind
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct FeatureRef {
    pub id: String,
    pub kind: QueryFeatureKind,
}

/// Request message containing a list of feature references to fetch.
/// An empty `feature_refs` requests all stored features.
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct GetFeaturesRequest {
    pub feature_refs: Vec<FeatureRef>,
}

/// Response message containing a list of fetched features
#[derive(Debug, Clone, PartialEq, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct GetFeaturesResponse {
    pub items: Vec<Feature>,
}