tf-types 0.1.8

Core semantic types, traits, and schemas powering the TrustForge protocol.
Documentation
// GENERATED by `tf-schema codegen --target rust` — DO NOT EDIT BY HAND.

#![allow(unused_imports, non_camel_case_types, non_snake_case, clippy::all)]

use serde::{Deserialize, Serialize};
use super::*;

/// A group of related packets (e.g. emergency packet + post-event quorum review) shipped together as a unit, for store-and-forward / air-gap workflows.
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
pub struct PacketBundle {
    /// Version of the packet-bundle schema itself.
    pub bundle_version: PacketBundle_BundleVersion,
    /// Stable bundle identifier.
    pub bundle_id: String,
    /// Human-readable bundle label.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub label: Option<String>,
    /// Packets carried by this bundle.
    pub packets: Vec<Packet>,
    /// How the bundle is being moved.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub transport_hint: Option<PacketBundle_TransportHint>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub created_at: Option<Timestamp>,
    pub signature: SignatureEnvelope,
}

/// Version of the packet-bundle schema itself.
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
pub enum PacketBundle_BundleVersion {
    #[serde(rename = "1")]
    V1,
}

/// How the bundle is being moved.
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
pub enum PacketBundle_TransportHint {
    #[serde(rename = "usb")]
    Usb,
    #[serde(rename = "qr-code")]
    QrCode,
    #[serde(rename = "serial")]
    Serial,
    #[serde(rename = "lora")]
    Lora,
    #[serde(rename = "file-drop")]
    FileDrop,
    #[serde(rename = "manual")]
    Manual,
}