···1// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT.
2//!Definitions for the `sh.weaver.notebook` namespace.
3pub mod authors;
04pub mod defs;
5pub mod entry;
6#[derive(Debug)]
···8impl atrium_api::types::Collection for Authors {
9 const NSID: &'static str = "sh.weaver.notebook.authors";
10 type Record = authors::Record;
00000011}
12#[derive(Debug)]
13pub struct Entry;
···1// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT.
2//!Definitions for the `sh.weaver.notebook` namespace.
3pub mod authors;
4+pub mod book;
5pub mod defs;
6pub mod entry;
7#[derive(Debug)]
···9impl atrium_api::types::Collection for Authors {
10 const NSID: &'static str = "sh.weaver.notebook.authors";
11 type Record = authors::Record;
12+}
13+#[derive(Debug)]
14+pub struct Book;
15+impl atrium_api::types::Collection for Book {
16+ const NSID: &'static str = "sh.weaver.notebook.book";
17+ type Record = book::Record;
18}
19#[derive(Debug)]
20pub struct Entry;
···001pub mod error;
2pub mod lexicons;
3pub mod oauth;
04pub use lexicons::*;
56-use atrium_identity::handle::DnsTxtResolver;
7-8pub use crate::error::{Error, IoError, ParseError, SerDeError};
910/// Canonical Cow for us, thanks Amos
11pub use merde::CowStr;
12-13-use hickory_resolver::TokioAsyncResolver;
1415/// too many cows, so we have conversions
16pub fn mcow_to_cow(cow: CowStr<'_>) -> std::borrow::Cow<'_, str> {
···36 markdown_weaver::CowStr::Inlined(s) => std::borrow::Cow::Owned(s.as_ref().to_owned()),
37 }
38}
39-40-pub struct HickoryDnsTxtResolver {
41- resolver: TokioAsyncResolver,
42-}
43-44-impl Default for HickoryDnsTxtResolver {
45- fn default() -> Self {
46- Self {
47- resolver: TokioAsyncResolver::tokio_from_system_conf()
48- .expect("failed to create resolver"),
49- }
50- }
51-}
52-53-impl DnsTxtResolver for HickoryDnsTxtResolver {
54- async fn resolve(
55- &self,
56- query: &str,
57- ) -> core::result::Result<Vec<String>, Box<dyn std::error::Error + Send + Sync + 'static>> {
58- Ok(self
59- .resolver
60- .txt_lookup(query)
61- .await?
62- .iter()
63- .map(|txt| txt.to_string())
64- .collect())
65- }
66-}
···1+pub mod client;
2+pub mod config;
3pub mod error;
4pub mod lexicons;
5pub mod oauth;
6+pub mod resolver;
7pub use lexicons::*;
8009pub use crate::error::{Error, IoError, ParseError, SerDeError};
1011/// Canonical Cow for us, thanks Amos
12pub use merde::CowStr;
001314/// too many cows, so we have conversions
15pub fn mcow_to_cow(cow: CowStr<'_>) -> std::borrow::Cow<'_, str> {
···35 markdown_weaver::CowStr::Inlined(s) => std::borrow::Cow::Owned(s.as_ref().to_owned()),
36 }
37}
0000000000000000000000000000