pub struct ContactEntry {
pub id: String,
pub entry_type: String,
pub value: String,
pub label: Option<String>,
pub platform: Option<String>,
pub handle: Option<String>,
pub visibility: Visibility,
pub verified: Option<bool>,
}Expand description
A single contact entry in an entity’s contact directory.
Each entry represents one reachable channel (phone, email, social profile, etc.) with its own visibility level for access control.
§DHT Behavior
For entries where visibility is not public, the DHT-stored copy contains:
{
"id": "phone-1",
"entryType": "phone",
"label": "Support",
"visibility": "organization",
"available": true,
"value": null
}The actual value is only served via the authenticated
OASPrivateEndpointService.
§Examples
use oas_document::contact::ContactEntry;
use oas_document::visibility::Visibility;
let phone = ContactEntry {
id: "phone-1".to_string(),
entry_type: "phone".to_string(),
value: "tel:+15551234567".to_string(),
label: Some("Primary".to_string()),
platform: None,
handle: None,
visibility: Visibility::Public,
verified: Some(true),
};
assert_eq!(phone.entry_type, "phone");Fields§
§id: StringFragment identifier (e.g., “phone-1”, “email-2”, “social-x”).
entry_type: StringEntry type: "phone", "email", "social", "website", "messaging".
value: StringThe contact value. Format depends on type:
- phone:
tel:+15551234567 - email:
mailto:agent@example.com - social:
https://x.com/agent - website:
https://example.com/agent - messaging:
https://t.me/agent_bot
label: Option<String>Human-readable label (e.g., “Primary”, “Support”, “Sales”, “Personal”).
platform: Option<String>Platform name for social/messaging entries (e.g., “x”, “linkedin”, “discord”, “telegram”, “github”, “slack”, “whatsapp”, “signal”).
handle: Option<String>Handle/username for social/messaging entries (e.g., “@agent42”).
visibility: VisibilityWho can see this entry’s actual value. Non-public entries show only the capability flag on the DHT.
verified: Option<bool>Whether this contact channel has been verified by the entity.
Trait Implementations§
Source§impl Clone for ContactEntry
impl Clone for ContactEntry
Source§fn clone(&self) -> ContactEntry
fn clone(&self) -> ContactEntry
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more