I'm trying to define a finger tree structure and implement its basic operations as an exercise in Rust. I've come up with the following, which is basically what's described in this paper . use self::FingerTree::{Empty, Single, Deep}; use self::Digit::{One, Two, Three, Four}; enum Digit<A> { One(A), Two(A, A), Three(A, A, A), Four(A, A, A, A), } enum Node<V, A> { Node2(V, A, A), Node3(V, A, A, A), } enum FingerTree<V, A> { Empty, Single(A), Deep { size: V, prefix: Digit<A>, tree: Box<FingerTree<V, Node<V, A>>>, suffix: Digit<A>, }, } fn main() { let e: FingerTree<i32, String> = Empty; }