This PR makes it possible to stash an owned value in a ValueBag<'v> itself without first needing to buffer it. The main motivation for this is to support short-term buffering in log's key-value API, where users who want to build a log::kv::Source need to fully buffer all key-value pairs first due to lifetime constraints. This new functionality could be used to only require buffering a single key-value pair at a time by making it easy to produce a ValueBag<'static>.
Closes #69
This PR makes it possible to stash an owned value in a
ValueBag<'v>
itself without first needing to buffer it. The main motivation for this is to support short-term buffering inlog
's key-value API, where users who want to build alog::kv::Source
need to fully buffer all key-value pairs first due to lifetime constraints. This new functionality could be used to only require buffering a single key-value pair at a time by making it easy to produce aValueBag<'static>
.