Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return something Readable/Writable in the clipboard API #52

Open
ealmloff opened this issue Jul 15, 2024 · 0 comments
Open

Return something Readable/Writable in the clipboard API #52

ealmloff opened this issue Jul 15, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@ealmloff
Copy link
Member

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 #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

@marc2332 marc2332 added the enhancement New feature or request label Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants