atrium_api/app/bsky/ageassurance/
begin.rs1pub const NSID: &str = "app.bsky.ageassurance.begin";
4#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
5#[serde(rename_all = "camelCase")]
6pub struct InputData {
7 pub country_code: String,
9 pub email: String,
11 pub language: String,
13 #[serde(skip_serializing_if = "core::option::Option::is_none")]
15 pub region_code: core::option::Option<String>,
16}
17pub type Input = crate::types::Object<InputData>;
18pub type Output = crate::app::bsky::ageassurance::defs::State;
19#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
20#[serde(tag = "error", content = "message")]
21pub enum Error {
22 InvalidEmail(Option<String>),
23 DidTooLong(Option<String>),
24 InvalidInitiation(Option<String>),
25 RegionNotSupported(Option<String>),
26}
27impl std::fmt::Display for Error {
28 fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result {
29 match self {
30 Error::InvalidEmail(msg) => {
31 write!(_f, "InvalidEmail")?;
32 if let Some(msg) = msg {
33 write!(_f, ": {msg}")?;
34 }
35 }
36 Error::DidTooLong(msg) => {
37 write!(_f, "DidTooLong")?;
38 if let Some(msg) = msg {
39 write!(_f, ": {msg}")?;
40 }
41 }
42 Error::InvalidInitiation(msg) => {
43 write!(_f, "InvalidInitiation")?;
44 if let Some(msg) = msg {
45 write!(_f, ": {msg}")?;
46 }
47 }
48 Error::RegionNotSupported(msg) => {
49 write!(_f, "RegionNotSupported")?;
50 if let Some(msg) = msg {
51 write!(_f, ": {msg}")?;
52 }
53 }
54 }
55 Ok(())
56 }
57}