Simpler way to check an _optional_ meta attribute for a possible value...
In my derive_builder
clone, here is what I need to do to see whether the user has set #[builder(pattern="owned")]
:
${defcond T_OWN all(tmeta(builder(pattern)),
approx_equal(${tmeta(builder(pattern)) as str}, "owned"))
}
I had hoped instead to say something like:
${defcond T_OWN approx_equal(${tmeta(builder(pattern)) missing_ok as str }, "owned"}
Or maybe even:
${defcond T_OWN approx_equal(${tmeta(builder(pattern)) default "mutable" as str }, "owned"}