#![deny(missing_debug_implementations)]

mod buf_ext;
mod bus_listener;
mod bytes;
mod channel_end;
mod convert_value;
mod deserialize;
mod deserialize_key;
mod ids;
mod impls;
mod key_impls;
mod protocol_version;
mod serialize;
mod serialize_key;
mod serialized_value;
mod service_info;
mod unknown_fields;
mod unknown_variant;
mod value;
mod value_kind;

pub mod adapters;
#[cfg(feature = "channel")]
pub mod channel;
pub mod deserializer;
#[cfg(feature = "introspection")]
pub mod introspection;
pub mod message;
pub mod serializer;
pub mod tags;
#[cfg(feature = "tokio")]
pub mod tokio;
pub mod transport;

pub use crate::bytes::{ByteSlice, Bytes};
#[cfg(all(feature = "derive", feature = "introspection"))]
pub use aldrin_macros::Introspectable;
#[cfg(feature = "derive")]
pub use aldrin_macros::{
    Deserialize, DeserializeKey, KeyTag, PrimaryKeyTag, PrimaryTag, RefType, Serialize,
    SerializeKey, Tag,
};
pub use bus_listener::{BusEvent, BusListenerFilter, BusListenerScope, BusListenerServiceFilter};
pub use channel_end::{ChannelEnd, ChannelEndWithCapacity};
pub use convert_value::ValueConversionError;
pub use deserialize::{Deserialize, DeserializeError, DeserializePrimary};
pub use deserialize_key::DeserializeKey;
pub use deserializer::Deserializer;
pub use ids::{
    BusListenerCookie, ChannelCookie, ObjectCookie, ObjectId, ObjectUuid, ServiceCookie, ServiceId,
    ServiceUuid, TypeId,
};
pub use protocol_version::{ProtocolVersion, ProtocolVersionParseError};
pub use serialize::{Serialize, SerializeError, SerializePrimary};
pub use serialize_key::SerializeKey;
pub use serialized_value::{SerializedValue, SerializedValueSlice};
pub use serializer::Serializer;
pub use service_info::ServiceInfo;
pub use unknown_fields::{AsUnknownFields, UnknownFields, UnknownFieldsRef};
pub use unknown_variant::{AsUnknownVariant, UnknownVariant, UnknownVariantRef};
pub use value::{Enum, Struct, Value};
pub use value_kind::ValueKind;

const MAX_VALUE_DEPTH: u8 = 32;
