melvin_ob/http_handler/http_request/
control_put.rs1use super::control_satellite::ControlSatelliteResponse;
2use super::request_common::{HTTPRequestMethod, HTTPRequestType, JSONBodyHTTPRequestType};
3
4#[derive(serde::Serialize, Debug)]
6pub(crate) struct ControlSatelliteRequest {
7 pub(crate) vel_x: f64,
9 pub(crate) vel_y: f64,
11 pub(crate) camera_angle: &'static str,
13 pub(crate) state: &'static str,
15}
16
17impl JSONBodyHTTPRequestType for ControlSatelliteRequest {
18 type Body = ControlSatelliteRequest;
20 fn body(&self) -> &Self::Body { self }
22}
23
24impl HTTPRequestType for ControlSatelliteRequest {
25 type Response = ControlSatelliteResponse;
27 fn endpoint(&self) -> &'static str { "/control" }
29 fn request_method(&self) -> HTTPRequestMethod { HTTPRequestMethod::Put }
31}