1#![warn(missing_docs)]
11#![warn(missing_debug_implementations)]
12#![warn(rust_2018_idioms)]
13
14pub mod ot;
15pub use openthread_sys as otsys;
16
17mod bindings;
18
19#[cfg(target_os = "fuchsia")]
20mod otfuchsia;
21
22pub type OtBox<T> = ot::Box<T>;
24
25pub type OtInstanceBox = ot::Box<ot::Instance>;
27
28pub type OtMessageBox<'a> = ot::Box<ot::Message<'a>>;
30
31#[macro_use]
33pub mod prelude {
34 #![allow(unused_imports)]
35
36 pub use crate::bindings::*;
37 pub use crate::{ot, otsys, OtBox, OtInstanceBox, OtMessageBox};
38 pub use ot::{
39 BackboneRouter as _, BorderRouter as _, Boxable as _, Dnssd as _, DnssdExt as _,
40 IntoOtError as _, Ip6 as _, Link as _, MessageBuffer as _, OtCastable as _, Reset as _,
41 SrpServer as _, State as _, Tasklets as _, Thread as _, Udp as _, Uptime as _,
42 };
43
44 pub use ot::TaskletsStreamExt as _;
45 pub use std::convert::{TryFrom as _, TryInto as _};
46}
47
48#[doc(hidden)]
50#[macro_use]
51pub(crate) mod prelude_internal {
52 #![allow(unused_imports)]
53
54 pub use crate::impl_ot_castable;
55 pub use crate::otsys::*;
56 pub use crate::prelude::*;
57 pub use core::convert::{TryFrom, TryInto};
58 pub use futures::prelude::*;
59 pub use log::{debug, error, info, trace, warn};
60 pub use num::FromPrimitive as _;
61 pub(crate) use ot::ascii_dump;
62 pub use ot::types::*;
63 pub use ot::{
64 BackboneRouter, BorderRouter, Boxable, Error, Instance, InstanceInterface, Ip6, Link,
65 Message, MessageBuffer, Platform, Result, SrpServer, Tasklets, Thread,
66 };
67 pub use static_assertions as sa;
68 pub use std::ffi::{CStr, CString};
69 pub use std::marker::PhantomData;
70 pub use std::os::raw::c_char;
71 pub use std::ptr::null;
72}