Skip to main content

twine_codec/
lib.rs

1// Copyright (c) 2025 Jake Swensen
2// SPDX-License-Identifier: MPL-2.0
3//
4// This Source Code Form is subject to the terms of the Mozilla Public
5// License, v. 2.0. If a copy of the MPL was not distributed with this
6// file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
8#![no_std]
9
10#[cfg(any(test, feature = "std"))]
11extern crate std;
12
13#[cfg(any(test, feature = "alloc"))]
14extern crate alloc;
15
16mod dataset;
17mod error;
18mod radio;
19mod rloc16;
20mod role;
21mod util;
22
23pub use dataset::{
24    Components, ExtendedPanId, MeshLocalPrefix, NetworkKey, NetworkName, OperationalDataset, Pskc,
25    SecurityPolicy, SecurityPolicyBuilder, Timestamp, VersionThreshold,
26};
27pub use error::TwineCodecError;
28pub use radio::{
29    Channel, ChannelMask, ChannelPageMask, Eui64, ExtendedAddress, PanId, RadioCapabilities,
30};
31pub use rloc16::Rloc16;
32pub use role::NetworkRole;
33pub(crate) use util::{fill_random_bytes, random_range_u16};