Cross-platform IPC peer identity type with error handling for Unix/Linux and Windows systems.
// Source: https://github.com/gebruder/wirken | License: MIT | Copyright 2026 gebruder
// Provided via justclaw.it.com; keep this notice with the code.
//! Cross-platform peer-identity type for IPC connections.
//!
//! `Principal` is the type returned by [`crate::Stream::peer_principal`]
//! and the type carried in audit events that record peer-credential
//! checks. The wire form is a tagged string (`uid:1000` on unix,
//! `sid:S-1-5-21-...` on windows) so audit consumers can parse a
//! single field without knowing what platform produced the event.
use std::fmt;
use std::str::FromStr;
use serde::{Deserialize, Deserializer, Serialize, Serializer};
use thiserror::Error;
/// Identity of the peer on the other end of an IPC connection.
///
/// The variants correspond to the native peer-cre
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key