Most APIs that let you get and set items in sdk return a signal which implements the readable and writable traits. Those traits expose a bunch of useful helper methods and more fine grained control over reads that return a result when the value is locked or dropped.
The clipboard API just exposes set and get which always panics if the value is dropped causing https://github.com/DioxusLabs/sdk/issues/54. If it implemented readable and writable, you could use try_read and try_write to get and set the value without panicing if the value is dropped
Most APIs that let you get and set items in sdk return a signal which implements the readable and writable traits. Those traits expose a bunch of useful helper methods and more fine grained control over reads that return a result when the value is locked or dropped.
The clipboard API just exposes set and get which always panics if the value is dropped causing https://github.com/DioxusLabs/sdk/issues/54. If it implemented readable and writable, you could use
try_read
andtry_write
to get and set the value without panicing if the value is dropped