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