Public declaration syntax from forge-rs/crates/forge-identity/src/glyph/mod.rs Original source SHA-256: 685cb3c462875bb7a4fcf47200bcf60a0d751b92cb61a63273372c2ca4ae4476 Function bodies and constant values are omitted. This is not the complete implementation. Source line 56 pub mod error; Source line 57 pub mod palette; Source line 58 pub mod payload; Source line 59 pub mod render; Source line 61 pub use error::{GlyphError, GlyphResult}; Source line 62 pub use palette::{GlyphColor, GlyphPalette}; Source line 81 #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] pub struct GlyphDescriptor { /// The agent's DID string (e.g. `did:oas:l1fe:agent:data-analyst`). pub did: String, /// The entity kind that determines the kind-region visual motif. pub kind: GlyphEntityKind, /// Optional human-readable label rendered below the glyph. pub label: Option } Source line 114 #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, serde::Serialize, serde::Deserialize)] pub enum GlyphEntityKind { /// Human Root identity. Hmr, /// Multi-Human Root identity. Mhr, /// Entity Root identity (organizations, services, etc.). Enr, /// Agent identity. Agent, /// Organization identity. Org, } Source line 146 pub fn parse_kind(s: &str) -> Option; Source line 166 pub fn as_str(&self) -> &'static str; Source line 189 pub fn as_u8(&self) -> u8; Source line 211 pub fn from_u8(v: u8) -> Option; Source line 238 #[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)] pub enum GlyphRenderTarget { /// SVG output for web rendering. Web, /// ANSI-colored terminal output. Terminal, } Source line 260 #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] pub struct GlyphRenderOptions { /// The render target (Web or Terminal). pub target: GlyphRenderTarget, /// Desired width in pixels (Web) or columns (Terminal). Defaults to 512/12. pub width: Option, /// Desired height in pixels (Web) or rows (Terminal). Defaults to 512/6. pub height: Option, /// Optional background color override. If `None`, the palette-derived /// background is used. pub color_override: Option } Source line 276 #[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)] pub enum GlyphRenderFormat { /// Self-contained SVG XML string. Svg, /// PNG image bytes. Png, /// ASCII art (plain text). AsciiArt, /// Braille dot pattern. Braille, /// ANSI half-block characters. HalfBlock, } Source line 307 #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] pub struct GlyphRenderResult { /// The output format. pub format: GlyphRenderFormat, /// The rendered data bytes. pub data: Vec, /// Width of the rendered output (pixels for SVG/PNG, columns for terminal). pub width: u32, /// Height of the rendered output (pixels for SVG/PNG, rows for terminal). pub height: u32 } Source line 337 pub fn svg_data(&self) -> Option;