pub trait BinaryTreesUnbalanced<'a>: TreesHeightError<'a> {
// Required methods
fn tree_of_with_height(
&self,
node: Self::Node,
height: u64
) -> BTWrap<'a, Self, Self::Tree>;
fn balancing_error<T: 'a + Send>(
&self,
error: BalancingError
) -> BTWrap<'a, Self, T>;
// Provided methods
fn balancing_bind<A: 'a, B: 'a + Send>(
&self,
ra: Result<A, BalancingError>,
f: impl FnOnce(A) -> BTWrap<'a, Self, B>
) -> BTWrap<'a, Self, B> { ... }
fn node_heights(&self, node: &Self::Node) -> (u64, u64) { ... }
}