Expand description
Solid Notifications Protocol (0.2) — Phase 2 implementation.
Ships both WebSocketChannel2023 and WebhookChannel2023 channel
types on top of a broadcast::Sender<StorageEvent> fed by the
Storage::watch() method added in Phase 1.
Reference: https://solid.github.io/notifications/protocol/
Payload shape (per spec §7, Activity Streams 2.0 on JSON-LD):
{
"@context": "https://www.w3.org/ns/activitystreams",
"id": "urn:uuid:...",
"type": "Create" | "Update" | "Delete",
"object": "https://pod.example.com/path",
"published": "2025-04-20T12:00:00Z"
}Modules§
- as_ns
as:type URIs per Activity Streams 2.0.
Structs§
- Change
Notification - Activity Streams 2.0 change notification payload.
- InMemory
Notifications - Subscription
- A single subscription record.
- WebSocket
Channel Manager - WebSocket-based notification channel. The manager maintains the
list of subscriptions and emits serialised change notifications on
a
tokio::sync::broadcastchannel that upstream HTTP servers attach WebSocket tasks to. - Webhook
Channel Manager - Webhook notification channel with built-in retry logic. The
manager keeps an internal map of subscriptions → target URL, and
deliver_all()POSTs the Activity Streams payload to each target.
Enums§
- Channel
Type - Channel type advertised by
.notificationsdiscovery. - Webhook
Delivery - Outcome of a webhook delivery attempt.
Traits§
- Notifications
- Public trait for notification backends.
Functions§
- discovery_
document - Build the subscription-discovery JSON-LD document served at
.notificationsper the Notifications Protocol §5.