Module prelude

Source
Expand description

Prelude module intended for blanket inclusion to make the crate easier to use.

use spinel_pack::prelude::*;

Re-exports§

pub use super::TryOwnedUnpack as _;
pub use super::TryPack as _;
pub use super::TryPackAs as _;
pub use super::TryUnpack as _;
pub use super::TryUnpackAs as _;

Macros§

impl_try_unpack_for_owned
Provides an automatic implementation of TryUnpack when wrapped around an implementation of TryOwnedUnpack.
spinel_read
In-line proc macro for parsing spinel-formatted data fields from a byte slice iterator.
spinel_write
In-line proc macro for writing spinel-formatted data fields to a type implementing std::io::Write.
spinel_write_len
In-line proc macro for determining the written length of spinel-formatted data fields.

Attribute Macros§

spinel_packed
Attribute macro which takes a Spinel format string as an argument and automatically defines the TryPack/TryUnpack traits for the given struct.