1#![cfg_attr(not(feature = "std"), no_std)]
2
3#[cfg(feature = "std")]
4extern crate std;
5
6extern crate alloc;
7
8mod common;
9pub mod v3;
10pub mod v5;
11
12#[allow(unused_imports)]
13pub(crate) use common::{
14 block_on, decode_var_int, encode_packet, from_read_exact_error, packet_from, read_bytes,
15 read_string, read_u16, read_u32, read_u8, write_bytes, write_string, write_u16, write_u32,
16 write_u8, write_var_int, AsyncRead, AsyncWrite, SyncRead, SyncWrite,
17};
18
19pub use common::{
20 decode_raw_header, header_len, remaining_len, total_len, var_int_len, Encodable, Error,
21 GenericPollBodyState, GenericPollPacket, GenericPollPacketState, IoErrorKind, Pid, PollHeader,
22 PollHeaderState, Protocol, QoS, QosPid, TopicFilter, TopicName, VarBytes, LEVEL_SEP,
23 MATCH_ALL_CHAR, MATCH_ALL_STR, MATCH_ONE_CHAR, MATCH_ONE_STR, SHARED_PREFIX, SYS_PREFIX,
24};
25
26#[cfg(feature = "std")]
28pub use embedded_io_adapters::{
29 std::{FromStd, ToStd},
30 tokio_1::FromTokio,
31};