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 51 52 53 54 55 56 57 58 59 60 61 62 63 64
//! # OpenMLS
//!
//! OpenMLS is an implementation of the [MLS RFC].
//!
//! The main entry point for most consumers should be the [MlsGroup](prelude::MlsGroup).
//! It provides an safe, opinionated API for interacting with core groups.
//!
//! ## Error handling
//!
//! OpenMLS is panic-free.
//! All functions that can potentially fail at some point return a [Result].
//!
//! Each module has an `errors.rs` defining module specific errors that are used
//! within the crate. This exposes some of the module errors that are publicly relevant.
//! All errors implement the [`Error`](`std::error::Error`) trait and
//! [`PartialEq`](`std::cmp::PartialEq`).
//!
//! See the [mod@error] module for more details.
//!
//! [MLS RFC]: https://datatracker.ietf.org/doc/draft-ietf-mls-protocol/
#![cfg_attr(docsrs, feature(doc_cfg))]
#![cfg_attr(not(test), forbid(unsafe_code))]
#![cfg_attr(not(feature = "test-utils"), warn(missing_docs))]
// === Testing ===
/// Single place, re-exporting all structs and functions needed for integration tests
#[cfg(any(feature = "test-utils", test))]
pub mod prelude_test;
#[cfg(any(feature = "test-utils", test))]
pub use rstest_reuse;
#[cfg(any(feature = "test-utils", test))]
#[macro_use]
pub mod test_utils;
// === Modules ===
#[macro_use]
mod utils;
#[macro_use]
pub mod error;
// Public
pub mod ciphersuite;
pub mod config;
pub mod credentials;
pub mod extensions;
pub mod framing;
pub mod group;
pub mod key_packages;
pub mod key_store;
pub mod messages;
pub mod schedule;
pub mod treesync;
// Private
mod binary_tree;
mod tree;
/// Single place, re-exporting the most used public functions.
pub mod prelude;