Skip to content

Add :context opt and make available to both encode/decode & telemetry#30

Merged
bencoppock merged 4 commits intomainfrom
context-for-codec
Mar 22, 2026
Merged

Add :context opt and make available to both encode/decode & telemetry#30
bencoppock merged 4 commits intomainfrom
context-for-codec

Conversation

@bencoppock
Copy link
Copy Markdown
Contributor

No description provided.

The 2-arity version passes a `Metadata` struct which can be useful
for conditional encode/decode logic at runtime.
This allows encode/decode functions to support conditional logic at
runtime, if needed. For example, based on the firmware reported by a
device, etc.

The supplied context will also be available in Telemetry data, and
it replaces the short-lived `:label` opt since it provides equal
(and more) functionality.
@bencoppock bencoppock merged commit 7f7df59 into main Mar 22, 2026
3 checks passed
@bencoppock bencoppock deleted the context-for-codec branch March 22, 2026 05:57
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