atrium_api/com/atproto/sync/
request_crawl.rs

1// @generated - This file is generated by atrium-codegen. DO NOT EDIT.
2//!Definitions for the `com.atproto.sync.requestCrawl` namespace.
3pub const NSID: &str = "com.atproto.sync.requestCrawl";
4#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
5#[serde(rename_all = "camelCase")]
6pub struct InputData {
7    ///Hostname of the current service (eg, PDS) that is requesting to be crawled.
8    pub hostname: String,
9}
10pub type Input = crate::types::Object<InputData>;
11#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
12#[serde(tag = "error", content = "message")]
13pub enum Error {
14    HostBanned(Option<String>),
15}
16impl std::fmt::Display for Error {
17    fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result {
18        match self {
19            Error::HostBanned(msg) => {
20                write!(_f, "HostBanned")?;
21                if let Some(msg) = msg {
22                    write!(_f, ": {msg}")?;
23                }
24            }
25        }
26        Ok(())
27    }
28}