openmls/binary_tree/
mod.rs

1//! This module defines the binary tree implementation used by OpenMLS.
2
3use array_representation::{
4    diff::{ABinaryTreeDiffError, AbDiff, StagedAbDiff},
5    tree::{ABinaryTree, ABinaryTreeError},
6};
7
8// Public
9pub use array_representation::LeafNodeIndex;
10
11// Crate
12pub(crate) mod array_representation;
13
14// Tests
15
16#[cfg(test)]
17mod tests;
18
19// Crate types
20
21/// We use this type alias as a convenience, so we can later swap out the tree
22/// representation with a feature-flag.
23pub(crate) type MlsBinaryTree<L, P> = ABinaryTree<L, P>;
24pub(crate) type MlsBinaryTreeDiff<'a, L, P> = AbDiff<'a, L, P>;
25pub(crate) type StagedMlsBinaryTreeDiff<L, P> = StagedAbDiff<L, P>;
26pub(crate) type MlsBinaryTreeError = ABinaryTreeError;
27pub(crate) type MlsBinaryTreeDiffError = ABinaryTreeDiffError;