1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
/// InsertError types.
pub enum InsertError<K: Clone + Ord + Send + Sync, V: Clone + Send + Sync> {
    /// Duplicated: the same key is found.
    Duplicated((K, V)),
    /// Full: the tree, node, or leaf could not accommodate the entry.
    Full((K, V)),
    /// Retry: the target node, or leaf is being modified.
    Retry((K, V)),
}

/// RemoveError types.
///
/// The boolean value tagged to the error code indicates that the target entry has been removed.
pub enum RemoveError {
    /// Coalesce: the node is too coarse, so that the adjacent node may be able to consume it.
    Coalesce(bool),
    /// Retry: the target node, or leaf is being modified.
    Retry(bool),
}