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 lifetime container attribute for user-provided lifetime #2744

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on May 15, 2024

  1. Add lifetime container attribute for user-provided lifetime

    This PR is for discussion and related to serde-rs#2190. As discussed there, the benefit is not obvious (except for providing more control to the user).
    
    With this PR, a user can use `#[serde(lifetime = 'a)]` to control the lifetime of the implementation of `Deserialize`. In particular, the user is now able to control all the implementation parameters when using `#[serde(bound = "", lifetime = 'a)]`.
    
    See https://github.com/ia0/wasefire/blob/ccf7bc30ac8440b30981b2f39b734de10d1a037c/crates/protocol/src/lib.rs#L65 for an example in real code.
    ia0 committed May 15, 2024
    Configuration menu
    Copy the full SHA
    76ab5a7 View commit details
    Browse the repository at this point in the history