I tried as a test to dog-food the applies API introduced in https://github.com/audunhalland/unimock/pull/43, but found I didn't like it very much. This change brings back the answers API, but without any type magic around its return type, so the respond API has been completely removed. The type returned through AnswerFn is just the same raw type that the trait method returns, and the signature is almost the same. Borrows can be made by using new method Unimock::make_ref.
I tried as a test to dog-food the
applies
API introduced in https://github.com/audunhalland/unimock/pull/43, but found I didn't like it very much. This change brings back theanswers
API, but without any type magic around its return type, so therespond
API has been completely removed. The type returned throughAnswerFn
is just the same raw type that the trait method returns, and the signature is almost the same. Borrows can be made by using new methodUnimock::make_ref
.