oas-document · profile
Declared module signatures, types, configuration, and source documentation.
Source: oas/oas/oas-document/src/profile.rs. SHA-256: 13d72c9dd8b98eb3ac9d1e010d03e26d64eea745cdc4dad9bf1e11334fbfaf6d.
This source reference follows declared modules and preserves feature attributes. It includes public declarations and implementation methods in those modules. Private-module exports and trait resolution still require the compiler; not every declaration is a crate-root import. Function bodies and constant values are omitted. Source comments describe their implementation context and are not a production deployment claim.
profile::ProfileSection
Profile section of an OAS Identity Document.
Provides human-readable presentation data for the entity. All fields are optional — entities expose only what they choose to.
Examples
use oas_document::profile::ProfileSection;
let profile = ProfileSection {
avatar_url: Some("https://cdn.example.com/agent-42/avatar.png".to_string()),
banner_url: None,
tagline: Some("AI-powered financial analysis agent".to_string()),
categories: vec!["finance".to_string(), "analytics".to_string()],
languages: vec!["en".to_string(), "es".to_string()],
timezone: Some("America/New_York".to_string()),
accent_color: Some("#3B82F6".to_string()),
};
assert_eq!(profile.languages.len(), 2);#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ProfileSection {
/// URL to the entity's avatar image.
#[serde(skip_serializing_if = "Option::is_none")]
pub avatar_url: Option<String>,
/// URL to the entity's banner/header image.
#[serde(skip_serializing_if = "Option::is_none")]
pub banner_url: Option<String>,
/// Short tagline or bio (max 280 chars, like a tweet).
#[serde(skip_serializing_if = "Option::is_none")]
pub tagline: Option<String>,
/// Category tags for discovery (e.g., "finance", "customer-support", "research").
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub categories: Vec<String>,
/// Supported languages as ISO 639-1 codes (e.g., "en", "es", "zh").
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub languages: Vec<String>,
/// IANA timezone identifier (e.g., "America/New_York", "UTC").
#[serde(skip_serializing_if = "Option::is_none")]
pub timezone: Option<String>,
/// Accent/brand color as hex (e.g., "#3B82F6").
#[serde(skip_serializing_if = "Option::is_none")]
pub accent_color: Option<String>
}Source line: 32.