fallback
This is a helper library to implement fallback mechaism.
It contains two Option
, and if the "desired" one is None
, the "base" one will be chosen.
A trait called FallbackSpec
is used to implement field fallback for a struct.
use *;
let data = Foo ;
let data = new;
let data = data.spec;
assert_eq!;
assert_eq!;