pub struct SensorMeshEnvelope {
pub topic: MeshSensorTopic,
pub cluster: String,
pub node_id: u64,
pub timestamp_ms: u64,
pub payload: Vec<u8>,
}Expand description
Envelope carried on the mesh wire + local topic bus for one sensor frame.
Fields§
§topic: MeshSensorTopicTarget topic kind.
cluster: StringLogical cluster name (topic suffix).
node_id: u64Emitting node id.
timestamp_ms: u64Observation / emission timestamp (ms).
payload: Vec<u8>Opaque CBOR (typically a signed wire frame from the sensor pipeline).
Implementations§
Source§impl SensorMeshEnvelope
impl SensorMeshEnvelope
Sourcepub fn topic_name(&self) -> String
pub fn topic_name(&self) -> String
Full topic string including cluster.
Sourcepub fn to_mesh_frame(&self) -> Result<MeshFrame, String>
pub fn to_mesh_frame(&self) -> Result<MeshFrame, String>
Build a mesh frame (FrameType::SensorObservation) for transport.
Sourcepub fn from_mesh_frame(frame: &MeshFrame) -> Result<Self, String>
pub fn from_mesh_frame(frame: &MeshFrame) -> Result<Self, String>
Decode from a mesh frame payload.
Sourcepub fn payload_digest_hex(&self) -> String
pub fn payload_digest_hex(&self) -> String
Stable hex digest of the payload for ExoChain indexing (FNV-1a 64).
Trait Implementations§
Source§impl Clone for SensorMeshEnvelope
impl Clone for SensorMeshEnvelope
Source§impl Debug for SensorMeshEnvelope
impl Debug for SensorMeshEnvelope
Source§impl<'de> Deserialize<'de> for SensorMeshEnvelope
impl<'de> Deserialize<'de> for SensorMeshEnvelope
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
impl Eq for SensorMeshEnvelope
Source§impl PartialEq for SensorMeshEnvelope
impl PartialEq for SensorMeshEnvelope
Source§impl Serialize for SensorMeshEnvelope
impl Serialize for SensorMeshEnvelope
impl StructuralPartialEq for SensorMeshEnvelope
Auto Trait Implementations§
impl Freeze for SensorMeshEnvelope
impl RefUnwindSafe for SensorMeshEnvelope
impl Send for SensorMeshEnvelope
impl Sync for SensorMeshEnvelope
impl Unpin for SensorMeshEnvelope
impl UnsafeUnpin for SensorMeshEnvelope
impl UnwindSafe for SensorMeshEnvelope
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more