pub struct PairSessionState {Show 17 fields
pub role: String,
pub relay_url: String,
pub pair_id: String,
pub code: String,
pub code_hash: String,
pub pake: PakeSide,
pub our_slot_id: String,
pub our_slot_token: String,
pub spake_key: Option<[u8; 32]>,
pub aead_key: Option<[u8; 32]>,
pub sas: Option<String>,
pub sas_confirmed: bool,
pub bootstrap_sealed_sent: bool,
pub finalized: bool,
pub aborted: Option<String>,
pub created_at: Instant,
pub spake2_seed: [u8; 32],
}Expand description
One in-flight pair session held in the MCP server process.
Public fields are read-only contracts; mutate only via the staged
pair_session_* functions below so invariants stay coherent.
Fields§
§role: String§relay_url: String§pair_id: String§code: String§code_hash: String§pake: PakeSide§our_slot_id: String§our_slot_token: String§spake_key: Option<[u8; 32]>§aead_key: Option<[u8; 32]>§sas: Option<String>Raw 6-digit SAS, no dash. Display as “{first 3}-{last 3}”.
sas_confirmed: bool§bootstrap_sealed_sent: bool§finalized: bool§aborted: Option<String>§created_at: Instant§spake2_seed: [u8; 32]Seed used to construct pake deterministically. Persisted by the
daemon’s pending-pair file so a daemon restart can reconstruct the
same SPAKE2 state and continue the handshake instead of aborting.
SECURITY: keep in user-only-readable files.
Implementations§
Source§impl PairSessionState
impl PairSessionState
pub fn session_id(&self) -> &str
pub fn formatted_sas(&self) -> Option<String>
Auto Trait Implementations§
impl !Freeze for PairSessionState
impl RefUnwindSafe for PairSessionState
impl Send for PairSessionState
impl Sync for PairSessionState
impl Unpin for PairSessionState
impl UnsafeUnpin for PairSessionState
impl UnwindSafe for PairSessionState
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