And your second example is a very usual thing to do with them.
(The first isn't common, but is doable, it's common to use types to enforce that failure is handled, not that it fits some extra requisites.)
And your second example is a very usual thing to do with them.
(The first isn't common, but is doable, it's common to use types to enforce that failure is handled, not that it fits some extra requisites.)