#[non_exhaustive]pub struct SensorOptions<'a> { /* private fields */ }Expand description
The parameters of Metrics::sensor_options.
Java’s widest sensor overload
(sensor(String, MetricConfig, long, Sensor.RecordingLevel, Sensor...),
Metrics.java:401) carries four parameters beyond the overload group’s
{name} intersection, so CLAUDE.md §2 caps the derived name and makes this
struct the method’s only parameter — every Java parameter lives here,
name included. This struct has no Java counterpart: it exists solely to
satisfy that naming rule (DoD #7).
It is #[non_exhaustive], so build it from SensorOptionsBuilder::new
and set the fields you need. Every other field’s initial value is Java’s —
what its narrower sensor overloads pass on the caller’s behalf. name has
no such initial value: Java declares no sensor overload that omits it, so
there is no Java-derived default to fall back on, and
SensorOptionsBuilder::build returns an error if it was not set. SensorOptions
itself has deliberately no Default for the same reason.
Trait Implementations§
Source§impl<'a> Clone for SensorOptions<'a>
impl<'a> Clone for SensorOptions<'a>
Source§fn clone(&self) -> SensorOptions<'a>
fn clone(&self) -> SensorOptions<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more