1#![cfg_attr(docsrs, feature(doc_cfg))]
25#![allow(
26 clippy::error_impl_error,
27 reason = "`Error` is the idiomatic name for the crate's top-level error enum, matching the `thiserror` convention used pervasively in the Rust ecosystem"
28)]
29#![cfg_attr(
30 test,
31 allow(
32 clippy::indexing_slicing,
33 reason = "JSON field indexing via `Value[\"key\"]` is ergonomic inside tests and its panic-on-missing behaviour is the desired failure mode when fixtures are wrong"
34 )
35)]
36
37#[cfg(feature = "client")]
38#[cfg_attr(docsrs, doc(cfg(feature = "client")))]
39mod client;
40mod discovery;
41mod error;
42mod schema;
43
44#[cfg(feature = "client")]
45#[cfg_attr(docsrs, doc(cfg(feature = "client")))]
46pub use self::client::{
47 DEFAULT_MAX_BODY_BYTES, fetch, fetch_discovery, fetch_discovery_with_limit, fetch_with_limit,
48 recommended_client,
49};
50pub use self::discovery::{Discovery, DiscoveryLink, SCHEMA_REL_PREFIX};
51pub use self::error::Error;
52pub use self::schema::{
53 InboundService, NodeInfo, NodeInfoBuilder, OutboundService, Protocol, Services, Software,
54 Usage, UserCount, Version,
55};
56
57pub type Result<T, E = Error> = core::result::Result<T, E>;
59
60pub const WELL_KNOWN_PATH: &str = "/.well-known/nodeinfo";