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

Add borrowed-settings to serial-settings #871

Closed
ryan-summers opened this issue Apr 4, 2024 · 1 comment · Fixed by #872
Closed

Add borrowed-settings to serial-settings #871

ryan-summers opened this issue Apr 4, 2024 · 1 comment · Fixed by #872

Comments

@ryan-summers
Copy link
Member

There's a desire to update the serial-settings crate to borrow the settings structure mutably when processing I/O.

There's some difficulties with figuring out how to manage this, as we need to then pipe the Settings borrowed item into the menu Context object.

However, because the Settings structure will be borrowed for some run-time lifetime (i.e. unknown and not 'static), this presents difficulties with the current approach as the Context structure cannot possible own the borrowed Settings type due to the not-concrete Settings borrow lifetime.

I'll investigate some potential approaches to resolve this.

@ryan-summers
Copy link
Member Author

I opened rust-embedded-community/menu#17 to investigate mechanisms of working around this limitation in menu.

I don't see a way to pipe a borrowed value with an unknown lifetime into the Context object currently if the Context is owned by the menu type.

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 a pull request may close this issue.

1 participant