pub struct StreamDescriptor {
pub source_key: String,
pub source_name: String,
pub source_path: String,
pub metadata: Value,
pub measurement_type: Option<String>,
pub sensor_id: Option<Uuid>,
pub replicates: Option<ReplicateSpec>,
pub decimal_places: Option<i16>,
pub instrument_granularity: Option<InstrumentGranularity>,
}Expand description
Describes a data stream to register with river-data.
Fields§
§source_key: StringUnique key within the source system (ie. a location id or column name).
source_name: StringHuman-readable name shown in the dashboard.
source_path: StringHierarchy path (ie. “cnet/VAD/WTW_DO_mgL_1”), parsed server-side for site discovery.
metadata: Value§measurement_type: Option<String>Stream classification (‘spot’ or ‘continuous’); None defers to the API’s resolution chain.
sensor_id: Option<Uuid>Owning sensor; required for streams whose readings carry curve claims.
replicates: Option<ReplicateSpec>Replicate-family declaration; requires measurement_type: "spot".
decimal_places: Option<i16>The decimal places the source stores or presents this channel at. Pairing writes it onto the slot where none is declared, and the public API expresses served values at it. None leaves the slot undeclared, which is served unrounded.
instrument_granularity: Option<InstrumentGranularity>The instrument each channel suggests at pairing: per parameter or per site and parameter.
Trait Implementations§
Source§impl Clone for StreamDescriptor
impl Clone for StreamDescriptor
Source§fn clone(&self) -> StreamDescriptor
fn clone(&self) -> StreamDescriptor
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more