atrium_api/com/atproto/sync/
get_head.rs1pub const NSID: &str = "com.atproto.sync.getHead";
4#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
5#[serde(rename_all = "camelCase")]
6pub struct ParametersData {
7 pub did: crate::types::string::Did,
9}
10pub type Parameters = crate::types::Object<ParametersData>;
11#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
12#[serde(rename_all = "camelCase")]
13pub struct OutputData {
14 pub root: crate::types::string::Cid,
15}
16pub type Output = crate::types::Object<OutputData>;
17#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
18#[serde(tag = "error", content = "message")]
19pub enum Error {
20 HeadNotFound(Option<String>),
21}
22impl std::fmt::Display for Error {
23 fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result {
24 match self {
25 Error::HeadNotFound(msg) => {
26 write!(_f, "HeadNotFound")?;
27 if let Some(msg) = msg {
28 write!(_f, ": {msg}")?;
29 }
30 }
31 }
32 Ok(())
33 }
34}