Skip to content

feat: Add mutable storage views for trailing fixed-layout fields including Vec and Option - #2

Open
snawaz wants to merge 6 commits into
snawaz/slicefrom
snawaz/flexible-vec
Open

snawaz wants to merge 6 commits into
snawaz/slicefrom
snawaz/flexible-vec

Conversation

@snawaz

@snawaz snawaz commented Aug 9, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Fixed-offset layouts can now mutate encoded storage directly instead of rebuilding an owned value.

  • Generated decode_mut(storage) views expose field-specific mutable accessors.
  • Scalars and options can be replaced in place, and fixed-capacity Vec fields can change active length within reserved storage.
  • A trailing Vec can grow by resizing its backing storage and supports push, pop, set, truncate, and clear operations.
  • Require macros accept caller-defined error conversions instead of depending on one program error type.
  • Validation preserves alignment, capacity, and storage-length invariants across immutable and mutable views.

Closes #9

@coderabbitai

coderabbitai Bot commented Aug 9, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 049b09c3-a163-45de-b3ad-64627bc62dd6

  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@snawaz
snawaz marked this pull request as ready for review August 9, 2026 18:22
@snawaz snawaz changed the title feat: Add mutable storage views for trailing fixed-layout Vec fields feat: Add mutable storage views for trailing fixed-layout fields including Vec and Option Aug 9, 2026
@snawaz
snawaz force-pushed the snawaz/flexible-vec branch from 0dceb34 to 684684c Compare August 9, 2026 19:31
@snawaz
snawaz force-pushed the snawaz/flexible-vec branch from 8d13374 to d67c1de Compare September 30, 2026 15:25
@snawaz snawaz added the enhancement New feature or request label Oct 19, 2026
@snawaz snawaz self-assigned this Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add mutable views for fixed-offset layouts

1 participant