spring_ai_rs/ai_interface/callback/
move_state.rs

1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Copy, PartialEq, Eq, Hash, Clone, Serialize, Deserialize)]
4pub enum MoveState {
5    HoldPosition,
6    Maneuvre,
7    Roam,
8}
9
10impl Into<i32> for MoveState {
11    fn into(self) -> i32 {
12        match self {
13            MoveState::HoldPosition => 0,
14            MoveState::Maneuvre => 1,
15            MoveState::Roam => 2,
16        }
17    }
18}
19
20impl Into<MoveState> for i32 {
21    fn into(self) -> MoveState {
22        match self {
23            0 => MoveState::HoldPosition,
24            1 => MoveState::Maneuvre,
25            2 => MoveState::Roam,
26            _ => unimplemented!(),
27        }
28    }
29}