1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: sh.tangled.knot
4//
5// This file was automatically generated from Lexicon schemas.
6// Any manual changes will be overwritten on the next regeneration.
7
8pub mod list_keys;
9pub mod member;
10pub mod version;
11
12#[jacquard_derive::lexicon]
13#[derive(
14 serde::Serialize,
15 serde::Deserialize,
16 Debug,
17 Clone,
18 PartialEq,
19 Eq,
20 jacquard_derive::IntoStatic
21)]
22#[serde(rename_all = "camelCase")]
23pub struct Knot<'a> {
24 pub created_at: jacquard_common::types::string::Datetime,
25}
26
27/// Typed wrapper for GetRecord response with this collection's record type.
28#[derive(
29 serde::Serialize,
30 serde::Deserialize,
31 Debug,
32 Clone,
33 PartialEq,
34 Eq,
35 jacquard_derive::IntoStatic
36)]
37#[serde(rename_all = "camelCase")]
38pub struct KnotGetRecordOutput<'a> {
39 #[serde(skip_serializing_if = "std::option::Option::is_none")]
40 #[serde(borrow)]
41 pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
42 #[serde(borrow)]
43 pub uri: jacquard_common::types::string::AtUri<'a>,
44 #[serde(borrow)]
45 pub value: Knot<'a>,
46}
47
48/// Marker type for deserializing records from this collection.
49pub struct KnotRecord;
50impl jacquard_common::xrpc::XrpcResp for KnotRecord {
51 const NSID: &'static str = "sh.tangled.knot";
52 const ENCODING: &'static str = "application/json";
53 type Output<'de> = KnotGetRecordOutput<'de>;
54 type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
55}
56
57impl jacquard_common::types::collection::Collection for Knot<'_> {
58 const NSID: &'static str = "sh.tangled.knot";
59 type Record = KnotRecord;
60}
61
62impl From<KnotGetRecordOutput<'_>> for Knot<'_> {
63 fn from(output: KnotGetRecordOutput<'_>) -> Self {
64 use jacquard_common::IntoStatic;
65 output.value.into_static()
66 }
67}