Skip to main content

Settable

Trait Settable 

Source
pub trait Settable: SchemaType {
    type Value;

    // Required method
    fn set(value: Self::Value, timestamp: u64) -> Self;
}
Expand description

Construct a schema instance from its primary value.

This defines the canonical way to create a new reading/measurement.

Required Associated Types§

Source

type Value

The primary value type (e.g., f32 for temperature)

Required Methods§

Source

fn set(value: Self::Value, timestamp: u64) -> Self

Create a new instance from a value.

§Parameters
  • value: The primary data value
  • timestamp: Unix timestamp in milliseconds

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§