Module streaming

Source
Expand description

Real-time streaming of sensor readings via BLE notifications.

This module provides functionality to subscribe to sensor readings and receive them as an async stream.

The stream supports graceful shutdown via the ReadingStream::close method, which uses a cancellation token to cleanly stop the background polling task.

Structs§

ReadingStream
A stream of sensor readings from a device.
StreamOptions
Options for reading streams.
StreamOptionsBuilder
Builder for StreamOptions.

Traits§

DeviceStreamExt
Extension trait for Device to create reading streams.

Functions§

from_device
Create a stream from a device without needing the trait import.
from_device_default
Create a stream with default options from a device.

Type Aliases§

ReadingResult
Result type for stream items.