Skip to content

docs(collections): clarify that store method bounds are per-method#639

Merged
ealmloff merged 1 commit intoDioxusLabs:mainfrom
BillionClaw:clawoss/docs/5380-clarify-store-methods-bounds
Mar 18, 2026
Merged

docs(collections): clarify that store method bounds are per-method#639
ealmloff merged 1 commit intoDioxusLabs:mainfrom
BillionClaw:clawoss/docs/5380-clarify-store-methods-bounds

Conversation

@BillionClaw
Copy link
Copy Markdown
Contributor

Clarifies the documentation for 'Extending stores with methods' to explicitly state that Lens bounds are added on a per-method basis, not for the entire impl block.

The original text was ambiguous about whether bounds are generated per-function or shared across the whole impl block. This change makes it clear that:

  • Each method gets its own Lens bounds based on its self parameter
  • Methods with \&self require Readable
  • Methods with \&mut self require Writable
  • Methods taking self by value have no bounds

Fixes DioxusLabs/dioxus#5380

The documentation for 'Extending stores with methods' was ambiguous about whether the Lens bounds are generated per-function or for the whole impl block.

This change clarifies that bounds are added on a per-method basis, allowing different methods to have different Lens bounds within the same impl block.

Fixes DioxusLabs/dioxus#5380
Copy link
Copy Markdown
Member

@ealmloff ealmloff left a comment

Choose a reason for hiding this comment

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

thanks

@ealmloff ealmloff merged commit 560da01 into DioxusLabs:main Mar 18, 2026
1 check passed
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.

Documentation of "Extending stores with methods" is ambiguous

2 participants