// @generated by jacquard-lexicon. DO NOT EDIT. // // Lexicon: sh.weaver.edit.diff // // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. /// An edit record for a notebook. #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, bon::Builder )] #[serde(rename_all = "camelCase")] pub struct Diff<'a> { #[serde(borrow)] pub doc: crate::sh_weaver::edit::DocRef<'a>, #[serde(borrow)] pub root: crate::com_atproto::repo::strong_ref::StrongRef<'a>, #[serde(borrow)] pub snapshot: jacquard_common::types::blob::Blob<'a>, } /// Typed wrapper for GetRecord response with this collection's record type. #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct DiffGetRecordOutput<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cid: std::option::Option>, #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, #[serde(borrow)] pub value: Diff<'a>, } /// Marker type for deserializing records from this collection. pub struct DiffRecord; impl jacquard_common::xrpc::XrpcResp for DiffRecord { const NSID: &'static str = "sh.weaver.edit.diff"; const ENCODING: &'static str = "application/json"; type Output<'de> = DiffGetRecordOutput<'de>; type Err<'de> = jacquard_common::types::collection::RecordError<'de>; } impl jacquard_common::types::collection::Collection for Diff<'_> { const NSID: &'static str = "sh.weaver.edit.diff"; type Record = DiffRecord; } impl From> for Diff<'_> { fn from(output: DiffGetRecordOutput<'_>) -> Self { use jacquard_common::IntoStatic; output.value.into_static() } }