A better Rust ATProto crate
1// @generated by jacquard-lexicon. DO NOT EDIT. 2// 3// Lexicon: blue.2048.verification.game 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 that holds a verification of a game record saying the owner of the repo has verified that it is a valid game played. 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 Game<'a> { 22 #[serde(skip_serializing_if = "std::option::Option::is_none")] 23 #[builder(into)] 24 pub created_at: Option<jacquard_common::types::string::Datetime>, 25 /// This is the record that holds the publicly verifiable signature of a game record 26 #[serde(skip_serializing_if = "std::option::Option::is_none")] 27 #[builder(into)] 28 #[serde(borrow)] 29 pub verified_ref: Option<crate::blue__2048::verification::VerificationRef<'a>>, 30} 31 32/// Typed wrapper for GetRecord response with this collection's record type. 33#[derive( 34 serde::Serialize, 35 serde::Deserialize, 36 Debug, 37 Clone, 38 PartialEq, 39 Eq, 40 jacquard_derive::IntoStatic 41)] 42#[serde(rename_all = "camelCase")] 43pub struct GameGetRecordOutput<'a> { 44 #[serde(skip_serializing_if = "std::option::Option::is_none")] 45 #[serde(borrow)] 46 pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>, 47 #[serde(borrow)] 48 pub uri: jacquard_common::types::string::AtUri<'a>, 49 #[serde(borrow)] 50 pub value: Game<'a>, 51} 52 53/// Marker type for deserializing records from this collection. 54pub struct GameRecord; 55impl jacquard_common::xrpc::XrpcResp for GameRecord { 56 const NSID: &'static str = "blue.2048.verification.game"; 57 const ENCODING: &'static str = "application/json"; 58 type Output<'de> = GameGetRecordOutput<'de>; 59 type Err<'de> = jacquard_common::types::collection::RecordError<'de>; 60} 61 62impl jacquard_common::types::collection::Collection for Game<'_> { 63 const NSID: &'static str = "blue.2048.verification.game"; 64 type Record = GameRecord; 65} 66 67impl From<GameGetRecordOutput<'_>> for Game<'_> { 68 fn from(output: GameGetRecordOutput<'_>) -> Self { 69 use jacquard_common::IntoStatic; 70 output.value.into_static() 71 } 72}