This PR adds a macro which generates a drop in replacement of Either enum:
pub enum Either<L, R> {
Left(L),
Right(R),
}
It is generated by create_either!(Either<A, B>).
The Either enum is used in libsql-server to hold two kinds of different WALs. This macro generates enum variants which can hold any number of WALs. This makes it easy to plug different WALs in the future.
This PR adds a macro which generates a drop in replacement of
Either
enum:It is generated by
create_either!(Either<A, B>)
.The
Either
enum is used in libsql-server to hold two kinds of different WALs. This macro generates enum variants which can hold any number of WALs. This makes it easy to plug different WALs in the future.