Kay-Conte/foxhole-rs

Optional Resolve Parameters

Closed this issue · 1 comments

Optional resolve parameters can be useful for handlers that don't always require some data to function. This feature is currently difficult to implement because of lifetime restrictions over a generic implementation when taking into account an Option of T where T has a non static lifetime. Any attempts to implement are welcome.

It is currently trivial however to support optional resolve parameters for static Ts though I worry this may cause confusion when trying to use this with a non static lifetime.

  • Implement Resolve for Option<T>

You may workaround this currently by constructing a new-type and implementing Resolve.

Open for discussion.

This was easier than I thought after investigation.