#[repr(C)]pub struct SemanticAtom {
pub entity_id: u32,
pub telemetry_info: u32,
pub predicate_id: u32,
pub value_mm: u32,
pub timestamp_us: u64,
pub tag_trust: u32,
pub pqc_anchor: u32,
}Fields§
§entity_id: u32§telemetry_info: u32§predicate_id: u32§value_mm: u32§timestamp_us: u64§tag_trust: u32§pqc_anchor: u32Implementations§
Source§impl SemanticAtom
impl SemanticAtom
pub fn new( entity_id: u32, telemetry_type: u16, predicate_id: u32, value_mm: u32, timestamp_us: u64, tag_id: u32, trust_level: u8, ) -> Self
pub fn telemetry_type(&self) -> u16
pub fn tag_id(&self) -> u32
pub fn trust_level(&self) -> u8
pub fn set_pqc_anchor(&mut self, anchor: u32)
pub fn is_critical_or_warning(&self) -> bool
pub fn get_value(&self) -> f64
pub fn to_bytes(&self) -> [u8; 32]
pub fn from_bytes(bytes: &[u8]) -> Result<Self, &'static str>
pub fn compute_hash(&self) -> [u8; 32]
Available on crate feature
pqc only.Trait Implementations§
Source§impl Clone for SemanticAtom
impl Clone for SemanticAtom
Source§fn clone(&self) -> SemanticAtom
fn clone(&self) -> SemanticAtom
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SemanticAtom
impl Debug for SemanticAtom
Source§impl<'de> Deserialize<'de> for SemanticAtom
impl<'de> Deserialize<'de> for SemanticAtom
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SemanticAtom
impl PartialEq for SemanticAtom
Source§impl Serialize for SemanticAtom
impl Serialize for SemanticAtom
impl Copy for SemanticAtom
impl Eq for SemanticAtom
impl StructuralPartialEq for SemanticAtom
Auto Trait Implementations§
impl Freeze for SemanticAtom
impl RefUnwindSafe for SemanticAtom
impl Send for SemanticAtom
impl Sync for SemanticAtom
impl Unpin for SemanticAtom
impl UnsafeUnpin for SemanticAtom
impl UnwindSafe for SemanticAtom
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more