A better Rust ATProto crate
1// @generated by jacquard-lexicon. DO NOT EDIT. 2// 3// Lexicon: dev.baileytownsend.health.rings 4// 5// This file was automatically generated from Lexicon schemas. 6// Any manual changes will be overwritten on the next regeneration. 7 8/// A record of daily activity rings (Apple Fitness), including move, exercise, and stand goals. 9#[jacquard_derive::lexicon] 10#[derive( 11 serde::Serialize, 12 serde::Deserialize, 13 Debug, 14 Clone, 15 PartialEq, 16 Eq, 17 jacquard_derive::IntoStatic, 18 bon::Builder 19)] 20#[serde(rename_all = "camelCase")] 21pub struct Rings<'a> { 22 pub created_at: jacquard_common::types::string::Datetime, 23 /// The total minutes of exercise completed. 24 pub exercise: i64, 25 /// The daily exercise goal in minutes. 26 pub exercise_goal: i64, 27 /// The total active calories burned for the day. 28 pub r#move: i64, 29 /// The daily move goal in calories. 30 pub move_goal: i64, 31 /// The daily stand goal in hours. 32 pub stand_goal: i64, 33 /// The number of hours the user stood up and moved around. 34 pub stand_hours: i64, 35} 36 37/// Typed wrapper for GetRecord response with this collection's record type. 38#[derive( 39 serde::Serialize, 40 serde::Deserialize, 41 Debug, 42 Clone, 43 PartialEq, 44 Eq, 45 jacquard_derive::IntoStatic 46)] 47#[serde(rename_all = "camelCase")] 48pub struct RingsGetRecordOutput<'a> { 49 #[serde(skip_serializing_if = "std::option::Option::is_none")] 50 #[serde(borrow)] 51 pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>, 52 #[serde(borrow)] 53 pub uri: jacquard_common::types::string::AtUri<'a>, 54 #[serde(borrow)] 55 pub value: Rings<'a>, 56} 57 58/// Marker type for deserializing records from this collection. 59pub struct RingsRecord; 60impl jacquard_common::xrpc::XrpcResp for RingsRecord { 61 const NSID: &'static str = "dev.baileytownsend.health.rings"; 62 const ENCODING: &'static str = "application/json"; 63 type Output<'de> = RingsGetRecordOutput<'de>; 64 type Err<'de> = jacquard_common::types::collection::RecordError<'de>; 65} 66 67impl jacquard_common::types::collection::Collection for Rings<'_> { 68 const NSID: &'static str = "dev.baileytownsend.health.rings"; 69 type Record = RingsRecord; 70} 71 72impl From<RingsGetRecordOutput<'_>> for Rings<'_> { 73 fn from(output: RingsGetRecordOutput<'_>) -> Self { 74 use jacquard_common::IntoStatic; 75 output.value.into_static() 76 } 77}