#![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"), any(feature = "alloc", feature = "no-atomic")))]
extern crate alloc as std;
#[cfg(feature = "std")]
extern crate std;
#[macro_use]
mod macros;
pub mod constants;
mod trace;
cfg_heap! {
mod backend;
}
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_storage! {
pub use name::Name;
}
pub mod error;
pub use error::{
BufferTooShortDetail, BufferTooSmallDetail, EncodeError, HandleError, HandleTimeoutError,
ParseError, PointerForwardDetail, RdlengthOverrunDetail, StartQueryError, StorageFullError,
TransmitError,
};
cfg_heap! {
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_storage! {
pub use event::{ServiceRenamed, ServiceUpdate};
}
pub mod config;
cfg_heap! {
pub mod records;
}
pub use config::EndpointConfig;
cfg_heap! {
pub use records::ServiceRecords;
pub use config::ServiceSpec;
}
cfg_storage! {
pub use config::QuerySpec;
}
cfg_heap! {
pub mod cache;
pub use cache::{Cache, CacheEntry};
}
pub mod service;
pub use service::ServiceState;
cfg_heap! {
pub use service::Service;
pub mod query;
pub use query::{CollectedAnswer, Query};
pub mod endpoint;
pub use endpoint::{
Endpoint, EndpointEventEntry, RouteEvents, ServiceRoute, WithdrawalSend, WithdrawalToken,
};
}