gyscos / gyscos/cursive

[FEATURE] Strongly-typed user data (or: implementing generic traits for Cursive based on user data)

Open
#597 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
4.8k
Forks
270
Avg merge
5d 19h
Merged PRs (30d)
2

Description

Hi @gyscos! I would like thank you for this nice library and ask you a question regarding extending `cursive` for more structured data/state management.

It seems that user data is typed as `Any`, is that right? Could it be possible to support some sort of strong typing? That would allow one to trivially implement new traits for `Cursive` by leveraging the internal data (by delegating methods to the internal object, **I'm specifically trying to implement the Redux pattern** as a trait). I'm not sure of this is possible without the compiler knowing the data type.

One could always default to a boxed `Any` or something like that, so that wouldn't require breaking things. What do you think about that?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.