Struct sttp::transport::SignalIndexCache
source · pub struct SignalIndexCache { /* private fields */ }
Expand description
Represents a mapping of 32-bit runtime IDs to 128-bit globally unique measurement IDs. The class additionally provides reverse lookup and an extra mapping to human-readable measurement keys.
Implementations§
source§impl SignalIndexCache
impl SignalIndexCache
sourcepub fn new() -> SignalIndexCache
pub fn new() -> SignalIndexCache
Creates a new, empty SignalIndexCache
.
sourcepub fn contains(&self, signal_index: i32) -> bool
pub fn contains(&self, signal_index: i32) -> bool
Determines if the specified signalindex exists with the SignalIndexCache
.
sourcepub fn signal_id(&self, signal_index: i32) -> Uuid
pub fn signal_id(&self, signal_index: i32) -> Uuid
Returns the signal ID Guid for the specified signalindex in the SignalIndexCache
.
sourcepub fn signal_ids(&self) -> HashSet<Uuid>
pub fn signal_ids(&self) -> HashSet<Uuid>
Gets a set for all the Guid values found in the SignalIndexCache
.
sourcepub fn source(&self, signal_index: i32) -> &str
pub fn source(&self, signal_index: i32) -> &str
Returns the Measurement
source string for the specified signalindex in the SignalIndexCache
.
sourcepub fn id(&self, signal_index: i32) -> u64
pub fn id(&self, signal_index: i32) -> u64
Returns the Measurement
integer ID for the specified signalindex in the SignalIndexCache
.
sourcepub fn record(&self, signal_index: i32) -> (Uuid, &str, u64, bool)
pub fn record(&self, signal_index: i32) -> (Uuid, &str, u64, bool)
Record returns the key Measurement
values, signal ID Guid, source string, and integer ID and a
final boolean value representing find success for the specified signalindex in the SignalIndexCache
.
sourcepub fn signal_index(&self, signal_id: Uuid) -> i32
pub fn signal_index(&self, signal_id: Uuid) -> i32
Returns the signal index for the specified signal ID Guid in the SignalIndexCache
.
Trait Implementations§
source§impl Clone for SignalIndexCache
impl Clone for SignalIndexCache
source§fn clone(&self) -> SignalIndexCache
fn clone(&self) -> SignalIndexCache
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more