OptrisOptrisDocumentation

Documentation/OTC SDK/optris_sdk — Rust API referencev12.0

ConfigSections

pub struct ConfigSections(u32);

One part of a configuration file, as a set.

A file carries some sections and not others, and an import can apply some of what it carries and not the rest. Those are three different sets over the same alphabet, which is why ConfigLoadReport reports three of these rather than one list.

ConfigSections — methods

pub fn names(self) -> Vec<&'static str>

The name of each section in the set, for display.

A set the SDK reports that this build does not recognise (possible, because sections may be appended) is rendered as other(0x…) rather than dropped, so a newer library's extra section stays visible instead of silently vanishing from a dialog.

pub fn contains(self, other: Self) -> bool

Whether every section of other is in this set.

ConfigSections::NONE is contained in everything, which is the mathematically right answer and the one that keeps contains(report.omitted) from needing a special case for the happy path.

pub fn is_empty(self) -> bool

Whether the set is empty.

pub fn bits(self) -> u32

The raw bit set.

pub fn from_bits(bits: u32) -> Self

Interpret a raw bit set from the C API.