coapcore/lib.rs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
//! A CoAP security for embedded devices, supporting OSCORE/EDHOC and managing credentials.
//!
//! The crate is under heavy development: Its API is in flux. So far, it has hidden dependencies on a
//! particular implementation of the [`coap-message`] provided (it needs to be a
//! [`coap_message_implementations::inmemory_write::Message`]).
//!
//! # Logging
//!
//! Extensive logging is available in this crate through [`defmt_or_log`], depending on features
//! enabled.
//!
//! Errors from CoAP are currently logged through its [`Debug2Format`](defmt_or_log::Debug2Format)
//! facility, representing a compromise between development and runtime complexity. Should
//! benchmarks show this to be a significant factor in code size in applications that need error
//! handling, more fine grained control can be implemented (eg. offering an option to make
//! Debug2Format merely print the type name or even make it empty).
//!
//! This crate mainly logs on the trace, debug and error level; the latter provides details when an
//! error is sent over the network and the details are not visible to the peer.
//!
//! See the book for [how defmt is configured in
//! Ariel OS](https://ariel-os.github.io/ariel-os/dev/docs/book/tooling/defmt.html).
//!
//! **Warning**: At the Debug level, this module may show cryptographic key material. This will be
//! revised once all components have been interop-tested.
#![doc = document_features::document_features!(feature_label = r#"<span class="stab portability"><code>{feature}</code></span>"#)]
#![no_std]
#![cfg_attr(feature = "_nightly_docs", feature(doc_auto_cfg))]
mod sealed;
use sealed::{PrivateMethod, Sealed};
mod iana;
mod helpers;
mod ace;
pub mod scope;
pub mod seccfg;
// Might warrant a standalone crate at some point
//
// This is pub only to make the doctests run (but the crate's pub-ness needs a major overhaul
// anyway)
pub mod oluru;
mod seccontext;
pub use seccontext::*;
mod error;
pub use error::CredentialError;