A better Rust ATProto crate
1// @generated by jacquard-lexicon. DO NOT EDIT. 2// 3// Lexicon: network.slices.waitlist.invite 4// 5// This file was automatically generated from Lexicon schemas. 6// Any manual changes will be overwritten on the next regeneration. 7 8///An invite granting a DID access, created by the slice owner 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 Invite<'a> { 21 ///When this invitation was created 22 pub created_at: jacquard_common::types::string::Datetime, 23 ///The DID being invited 24 #[serde(borrow)] 25 pub did: jacquard_common::types::string::Did<'a>, 26 ///Optional expiration date for this invitation 27 #[serde(skip_serializing_if = "std::option::Option::is_none")] 28 pub expires_at: std::option::Option<jacquard_common::types::string::Datetime>, 29 ///The AT URI of the slice this invite is for 30 #[serde(borrow)] 31 pub slice: jacquard_common::types::string::AtUri<'a>, 32} 33 34/// Typed wrapper for GetRecord response with this collection's record type. 35#[derive( 36 serde::Serialize, 37 serde::Deserialize, 38 Debug, 39 Clone, 40 PartialEq, 41 Eq, 42 jacquard_derive::IntoStatic 43)] 44#[serde(rename_all = "camelCase")] 45pub struct InviteGetRecordOutput<'a> { 46 #[serde(skip_serializing_if = "std::option::Option::is_none")] 47 #[serde(borrow)] 48 pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>, 49 #[serde(borrow)] 50 pub uri: jacquard_common::types::string::AtUri<'a>, 51 #[serde(borrow)] 52 pub value: Invite<'a>, 53} 54 55/// Marker type for deserializing records from this collection. 56pub struct InviteRecord; 57impl jacquard_common::xrpc::XrpcResp for InviteRecord { 58 const NSID: &'static str = "network.slices.waitlist.invite"; 59 const ENCODING: &'static str = "application/json"; 60 type Output<'de> = InviteGetRecordOutput<'de>; 61 type Err<'de> = jacquard_common::types::collection::RecordError<'de>; 62} 63 64impl jacquard_common::types::collection::Collection for Invite<'_> { 65 const NSID: &'static str = "network.slices.waitlist.invite"; 66 type Record = InviteRecord; 67} 68 69impl From<InviteGetRecordOutput<'_>> for Invite<'_> { 70 fn from(output: InviteGetRecordOutput<'_>) -> Self { 71 use jacquard_common::IntoStatic; 72 output.value.into_static() 73 } 74}