pub struct ServiceEndpoint {
pub id: String,
pub service_type: String,
pub service_endpoint: String,
pub label: Option<String>,
pub description: Option<String>,
pub properties: Option<BTreeMap<String, String>>,
}Expand description
A service endpoint in an OAS Identity Document.
See OAS Specification §5.6 for standard service types.
§Examples
use oas_document::service::ServiceEndpoint;
let svc = ServiceEndpoint {
id: "did:oas:ns:agent:bot#api".to_string(),
service_type: "OASEntity".to_string(),
service_endpoint: "https://example.com/bot".to_string(),
label: Some("Primary API".to_string()),
description: Some("Main agent interaction endpoint".to_string()),
properties: None,
};Fields§
§id: StringThe service ID (e.g., did:oas:ns:agent:bot#service-1).
service_type: StringThe service type.
service_endpoint: StringThe service endpoint URI.
label: Option<String>Human-readable label for this service.
description: Option<String>Human-readable description of what this service does.
properties: Option<BTreeMap<String, String>>Arbitrary key-value properties for this service. Useful for protocol-specific metadata (e.g., API version, auth scheme).
Trait Implementations§
Source§impl Clone for ServiceEndpoint
impl Clone for ServiceEndpoint
Source§impl Debug for ServiceEndpoint
impl Debug for ServiceEndpoint
Source§impl<'de> Deserialize<'de> for ServiceEndpoint
impl<'de> Deserialize<'de> for ServiceEndpoint
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ServiceEndpoint
Source§impl PartialEq for ServiceEndpoint
impl PartialEq for ServiceEndpoint
Source§impl Serialize for ServiceEndpoint
impl Serialize for ServiceEndpoint
impl StructuralPartialEq for ServiceEndpoint
Auto Trait Implementations§
impl Freeze for ServiceEndpoint
impl RefUnwindSafe for ServiceEndpoint
impl Send for ServiceEndpoint
impl Sync for ServiceEndpoint
impl Unpin for ServiceEndpoint
impl UnsafeUnpin for ServiceEndpoint
impl UnwindSafe for ServiceEndpoint
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