atrium_api/app/bsky/bookmark/
create_bookmark.rs

1// @generated - This file is generated by atrium-codegen. DO NOT EDIT.
2//!Definitions for the `app.bsky.bookmark.createBookmark` namespace.
3pub const NSID: &str = "app.bsky.bookmark.createBookmark";
4#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
5#[serde(rename_all = "camelCase")]
6pub struct InputData {
7    pub cid: crate::types::string::Cid,
8    pub uri: 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    ///The URI to be bookmarked is for an unsupported collection.
15    UnsupportedCollection(Option<String>),
16}
17impl std::fmt::Display for Error {
18    fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result {
19        match self {
20            Error::UnsupportedCollection(msg) => {
21                write!(_f, "UnsupportedCollection")?;
22                if let Some(msg) = msg {
23                    write!(_f, ": {msg}")?;
24                }
25            }
26        }
27        Ok(())
28    }
29}