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

User defined types in Env #1910

Merged
merged 1 commit into from
Aug 16, 2021
Merged

Conversation

maan2003
Copy link
Collaborator

No description provided.

/// A dynamic type representing all values that can be stored in an environment.
#[derive(Clone, Data, PartialEq)]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This removes PartialEq. it is not straight forward to implement with Arc<dyn Any>. I think Data should be sufficient

Copy link
Member

@cmyr cmyr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm okay, this does seem quite straightforward, let's give it a shot?

I am curious about the use-case, though!

@maan2003
Copy link
Collaborator Author

I want to store Sender<Box<dyn Future>> in Env. So I can spawn futures from any widget.

@maan2003 maan2003 merged commit 3118b58 into linebender:master Aug 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants