#![doc = include_str!("../README.md")]
#![cfg_attr(not(feature = "std"), no_std)]
#![cfg_attr(not(test), forbid(unsafe_code))]
#![cfg_attr(test, deny(unsafe_code))]
#![deny(missing_docs)]
#![allow(unexpected_cfgs)]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![cfg_attr(docsrs, allow(unused_attributes))]
#![cfg_attr(
not(test),
deny(
clippy::unwrap_used,
clippy::expect_used,
clippy::panic,
clippy::panic_in_result_fn,
clippy::indexing_slicing,
clippy::integer_division,
clippy::arithmetic_side_effects,
clippy::unreachable,
clippy::todo,
clippy::unimplemented,
clippy::string_slice
)
)]
#[cfg(all(not(feature = "std"), feature = "alloc"))]
extern crate alloc as std;
#[cfg(feature = "std")]
extern crate std;
pub mod constants;
mod trace;
pub mod pool;
pub use pool::Pool;
pub mod time;
pub use time::Instant;
#[cfg(feature = "slab")]
#[cfg_attr(docsrs, doc(cfg(feature = "slab")))]
pub use slab;
pub mod handle;
pub use handle::{QueryHandle, ServiceHandle};
pub mod name;
pub use name::{LabelTooLongDetail, NameError, NameTooLongDetail};
#[cfg(any(feature = "alloc", feature = "std", feature = "heapless"))]
#[cfg_attr(
docsrs,
doc(cfg(any(feature = "alloc", feature = "std", feature = "heapless")))
)]
pub use name::Name;
pub mod error;
pub use error::{
BufferTooShortDetail, BufferTooSmallDetail, EncodeError, HandleError, HandleTimeoutError,
ParseError, PointerForwardDetail, RdlengthOverrunDetail, StartQueryError, StorageFullError,
TransmitError,
};
#[cfg(any(feature = "alloc", feature = "std"))]
#[cfg_attr(docsrs, doc(cfg(any(feature = "alloc", feature = "std"))))]
pub use error::{CancelQueryError, HandleServiceRenamedError, RegisterServiceError};
pub mod wire;
pub mod event;
pub mod transmit;
pub use event::{
EndpointEvent, HostConflict, KnownAnswer, ProbeConflict, QueryEvent, QueryUpdate, RouteEvent,
ServiceEvent, ServiceQuestion, ToQuery, ToService,
};
pub use transmit::Transmit;
#[cfg(any(feature = "alloc", feature = "std", feature = "heapless"))]
#[cfg_attr(
docsrs,
doc(cfg(any(feature = "alloc", feature = "std", feature = "heapless")))
)]
pub use event::{ServiceRenamed, ServiceUpdate};
pub mod config;
#[cfg(any(feature = "alloc", feature = "std"))]
pub mod records;
pub use config::EndpointConfig;
#[cfg(any(feature = "alloc", feature = "std"))]
#[cfg_attr(docsrs, doc(cfg(any(feature = "alloc", feature = "std"))))]
pub use records::ServiceRecords;
#[cfg(any(feature = "alloc", feature = "std"))]
#[cfg_attr(docsrs, doc(cfg(any(feature = "alloc", feature = "std"))))]
pub use config::ServiceSpec;
#[cfg(any(feature = "alloc", feature = "std", feature = "heapless"))]
#[cfg_attr(
docsrs,
doc(cfg(any(feature = "alloc", feature = "std", feature = "heapless")))
)]
pub use config::QuerySpec;
#[cfg(any(feature = "alloc", feature = "std"))]
#[cfg_attr(docsrs, doc(cfg(any(feature = "alloc", feature = "std"))))]
pub mod cache;
#[cfg(any(feature = "alloc", feature = "std"))]
#[cfg_attr(docsrs, doc(cfg(any(feature = "alloc", feature = "std"))))]
pub use cache::{Cache, CacheEntry};
pub mod service;
pub use service::ServiceState;
#[cfg(any(feature = "alloc", feature = "std"))]
#[cfg_attr(docsrs, doc(cfg(any(feature = "alloc", feature = "std"))))]
pub use service::Service;
#[cfg(any(feature = "alloc", feature = "std"))]
#[cfg_attr(docsrs, doc(cfg(any(feature = "alloc", feature = "std"))))]
pub mod query;
#[cfg(any(feature = "alloc", feature = "std"))]
#[cfg_attr(docsrs, doc(cfg(any(feature = "alloc", feature = "std"))))]
pub use query::{CollectedAnswer, Query};
#[cfg(any(feature = "alloc", feature = "std"))]
#[cfg_attr(docsrs, doc(cfg(any(feature = "alloc", feature = "std"))))]
pub mod endpoint;
#[cfg(any(feature = "alloc", feature = "std"))]
#[cfg_attr(docsrs, doc(cfg(any(feature = "alloc", feature = "std"))))]
pub use endpoint::{
Endpoint, EndpointEventEntry, RouteEvents, ServiceRoute, WithdrawalSend, WithdrawalToken,
};