Skip to content

[guard] Update BStackGuardedSlice with BStackSlice parities, new pre/post processing, and crash-atomic APIs - #73

Merged
williamwutq merged 5 commits into
masterfrom
guard
Sep 2, 2026
Merged

[guard] Update BStackGuardedSlice with BStackSlice parities, new pre/post processing, and crash-atomic APIs#73
williamwutq merged 5 commits into
masterfrom
guard

Conversation

@williamwutq

Copy link
Copy Markdown
Owner

Description: Maintain previously undermaintained BStackGuardedSlice. It now gains a full I/O surface derived from whole-block decode/encode. The transform hooks are now whole-block: decode maps the raw stored bytes to the apparent (decoded) bytes and encode the reverse — both default to identity, so a transforming guard (encryption, compression) implements only len, raw_block, decode, and encode. It provides various io methods that are parity to what BStackSlice already provides, such as read, read_range, get, contains, find/rfind, write/copy_from_slice, zero/fill, process, copy_within, etc. All methods are crash-atomic, either through a single BStack call, tylically routed through underlying BStackSlice, or through BStack::process_gen that decodes, mutates, re-encodes, and writes under a single held lock, aborting when encountering errors.

Important Feature: No
Type: Feature
Tests: Included
Feature Flags: guard
Breaking change: No (but with deprecation to some methods)
New Types: None
Rust Only: Yes
Fuzz: No
Safety Review: Needed: Invariants, Correctness

@williamwutq williamwutq left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

LGTM

@williamwutq
williamwutq merged commit 9d908c8 into master Sep 2, 2026
16 checks passed
@williamwutq
williamwutq deleted the guard branch September 2, 2026 16:35
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.

1 participant