Skip to main content

tf_types/generated/
packet_fragment.rs

1// GENERATED by `tf-schema codegen --target rust` — DO NOT EDIT BY HAND.
2
3#![allow(unused_imports, non_camel_case_types, non_snake_case, clippy::all)]
4
5use serde::{Deserialize, Serialize};
6use super::*;
7
8/// Fragmentation header attached to a Packet when its payload is too large for the underlying transport (LoRa MTU, BLE characteristic size, etc.). Fragments are reassembled by their destination using `fragment_id` + `index` + `count`.
9#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
10pub struct PacketFragment {
11    /// Stable identifier shared by every fragment that belongs to the same logical packet.
12    pub fragment_id: String,
13    /// Zero-based index of this fragment within the sequence.
14    pub index: i64,
15    /// Total number of fragments in the sequence.
16    pub count: i64,
17    /// Size of the reassembled payload in bytes; reassembly fails if the assembled output differs.
18    pub total_payload_bytes: i64,
19    /// Hash of the reassembled canonical payload; consumers MUST verify this after reassembly.
20    pub payload_digest: HashRef,
21}