Open stefnotch opened 1 month ago
I would be willing to contribute a pull request with such a feature and unit tests.
PR very welcome! Sounds like a great addition.
(The same can be done for arena-stored types as well, if they are first disposed.)
Is your feature request related to a problem? Please describe.
I am using Leptos to manage large objects, including WebGPU objects that cannot be cloned. I would wrap the object in a signal, do some reactive operations with it, and would subsequently like to get the object back.
A very similar case came up while I was trying to implement a
pop
method forstruct SignalVec<T> { ArcRwSignal<Vec<ArcRwSignal<T>>> }
. See https://github.com/leptos-rs/leptos/discussions/3066Describe the solution you'd like I'd love it if there were a function analogous to the standard library
RwLock/Arc::into_inner
.Describe alternatives you've considered Using clunky workarounds, such as wrapping my objects into
Option
s, and taking the values out of the options.