openmls 0.4.1

This is a WIP Rust implementation of the Messaging Layer Security (MLS) protocol based on draft 12+.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::tree::*;

/// Test whether a NodeIndex is a leaf or a parent
#[test]
fn test_leaf_parent() {
    // Index 1 should be a parent node
    let index = NodeIndex::from(1usize);
    assert!(!index.is_leaf());
    assert!(index.is_parent());

    // Index 2 should be a parent node
    let index = NodeIndex::from(2usize);
    assert!(index.is_leaf());
    assert!(!index.is_parent());
}