1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// 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::*;
/// Signed record describing a TrustForge session being moved between transports while preserving session_id, generation, and trust continuity (TF-0003 "session migration").
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
pub struct SessionMigration {
/// Version of the session-migration schema itself.
pub migration_version: SessionMigration_MigrationVersion,
/// The session id that survives the migration. Must equal the pre-migration session id.
pub session_id: String,
/// Migration counter. Increases by 1 per migration; lets receivers detect replays.
pub generation: i64,
pub from_binding: TransportBinding,
pub to_binding: TransportBinding,
/// Capabilities the migration explicitly preserves.
#[serde(skip_serializing_if = "Option::is_none", default)]
pub preserved_capabilities: Option<Vec<Capability>>,
/// Whether the session keys were rotated as part of the migration.
#[serde(skip_serializing_if = "Option::is_none", default)]
pub rotated_keys: Option<bool>,
pub migrated_at: Timestamp,
/// Human-readable reason (transport upgrade, network change, peer reconnect, ...).
#[serde(skip_serializing_if = "Option::is_none", default)]
pub reason: Option<String>,
pub signer: ActorId,
pub signature: SignatureEnvelope,
}
/// Version of the session-migration schema itself.
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
pub enum SessionMigration_MigrationVersion {
#[serde(rename = "1")]
V1,
}