You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+23-1Lines changed: 23 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,29 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
27
27
28
28
## [Unreleased]
29
29
30
-
No changes yet.
30
+
### Added
31
+
32
+
-**Context-Aware Deserializers (Design 026)**: Inbound connector deserializers can now receive a `RuntimeContext<R>` for platform-independent timestamps and logging
33
+
- New `.with_deserializer(|ctx, bytes| ...)` API on `InboundConnectorBuilder` provides `RuntimeContext<R>` to deserialization closures
34
+
- New `.with_deserializer_raw(|bytes| ...)` for plain bytes-only deserialization when context is unnecessary
35
+
-`DeserializerKind` enum enforces mutual exclusivity between raw and context-aware deserializers
36
+
-`Router::route()` propagates optional runtime context to context-aware routes
37
+
-**Context-Aware Serializers**: Outbound connector serializers can now receive a `RuntimeContext<R>`, symmetric with deserializers
38
+
- New `.with_serializer(|ctx, value| ...)` API on `OutboundConnectorBuilder` provides `RuntimeContext<R>` to serialization closures
39
+
- New `.with_serializer_raw(|value| ...)` for plain value-only serialization when context is unnecessary
-**aimdb-core**: Breaking API changes to `InboundConnectorLink`, `Router`, and `RouterBuilder` to support `DeserializerKind` (see [aimdb-core/CHANGELOG.md](aimdb-core/CHANGELOG.md))
47
+
-**aimdb-core**: Breaking API change — `ConnectorLink.serializer` now stores `SerializerKind` instead of `SerializerFn`
48
+
-**aimdb-core**: `.with_serializer()` renamed to `.with_serializer_raw()` for the old single-argument pattern
49
+
-**aimdb-mqtt-connector**: Updated router dispatch for new `route()` signature; outbound publishers dispatch via `SerializerKind`
50
+
-**aimdb-knx-connector**: Updated router dispatch for new `route()` signature; outbound publishers dispatch via `SerializerKind`
51
+
-**aimdb-websocket-connector**: Updated router dispatch for new `route()` signature; outbound publishers dispatch via `SerializerKind`
52
+
- All connector examples updated to use new `.with_deserializer(|_ctx, bytes| ...)` and `.with_serializer_raw(|value| ...)` signatures
Copy file name to clipboardExpand all lines: aimdb-core/CHANGELOG.md
+26-1Lines changed: 26 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,32 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## [Unreleased]
9
9
10
-
No changes yet.
10
+
### Added
11
+
12
+
-**Context-Aware Deserializers (Design 026)**: Inbound connector deserializers can now receive a `RuntimeContext<R>` for platform-independent timestamps and logging during deserialization
13
+
- New `ContextDeserializerFn` type alias for context-aware type-erased deserializer callbacks
14
+
- New `DeserializerKind` enum (`Raw` / `Context`) to enforce mutual exclusivity between plain and context-aware deserializers
15
+
-`.with_deserializer(|ctx, bytes| ...)` now accepts a context-aware closure receiving `RuntimeContext<R>`
16
+
-`.with_deserializer_raw(|bytes| ...)` added for plain bytes-only deserialization (no context needed)
17
+
-`Router::route()` now accepts an optional type-erased runtime context (`Option<&Arc<dyn Any + Send + Sync>>`)
18
+
- Context deserializer routes are gracefully skipped when no context is provided
19
+
-**Context-Aware Serializers**: Outbound connector serializers can now receive a `RuntimeContext<R>`, symmetric with deserializers
20
+
- New `ContextSerializerFn` type alias for context-aware type-erased serializer callbacks
21
+
- New `SerializerKind` enum (`Raw` / `Context`) to enforce mutual exclusivity between plain and context-aware serializers
22
+
-`.with_serializer(|ctx, value| ...)` now accepts a context-aware closure receiving `RuntimeContext<R>`
23
+
-`.with_serializer_raw(|value| ...)` added for plain value-only serialization (no context needed)
24
+
25
+
### Changed
26
+
27
+
-**Breaking**: `InboundConnectorLink::deserializer` field type changed from `DeserializerFn` to `DeserializerKind`
28
+
-**Breaking**: `InboundConnectorLink::new()` now takes `DeserializerKind` instead of `DeserializerFn`
29
+
-**Breaking**: `Router::route()` signature changed to accept an additional `ctx` parameter
30
+
-**Breaking**: `RouterBuilder::from_routes()` and `RouterBuilder::add_route()` now take `DeserializerKind` instead of `DeserializerFn`
31
+
-**Breaking**: `ConnectorLink::serializer` field type changed from `Option<SerializerFn>` to `Option<SerializerKind>`
32
+
-**Breaking**: `.with_serializer()` renamed to `.with_serializer_raw()` — old single-argument pattern
33
+
-**Breaking**: `OutboundRoute` type alias updated to use `SerializerKind`
34
+
-**Breaking**: `.with_deserializer()` on `InboundConnectorBuilder` now expects `Fn(RuntimeContext<R>, &[u8]) -> Result<T, String>` instead of `Fn(&[u8]) -> Result<T, String>` — use `.with_deserializer_raw()` for the previous bytes-only signature
35
+
-`AimDb::collect_inbound_routes()` return type updated to use `DeserializerKind`
// For no_std, we need a static reference - this would typically be handled
146
-
// by the caller storing the adapter in a static cell first
147
-
// For now, we'll document this limitation
148
-
panic!("context() not supported in no_std without a static reference. To use context(), store your adapter in a static cell (e.g., StaticCell from portable-atomic or embassy-sync), or use adapter() directly.")
0 commit comments