We designed Backend as an enum because serde doesn't support serializing a Trat object. It involves a little awkward implementation of update method, because one update method should consider all variants of backends.
I took a look at typetag crate, and I think we can make Backend as a Trait with the help of this crate.
We designed
Backend
as an enum because serde doesn't support serializing a Trat object. It involves a little awkward implementation of update method, because one update method should consider all variants of backends.I took a look at typetag crate, and I think we can make
Backend
as a Trait with the help of this crate.