pub struct InteroperabilitySection {
pub protocols: Vec<ProtocolSupport>,
pub api_schemas: Vec<ApiSchema>,
pub auth_methods: Vec<String>,
}Expand description
Interoperability section of an OAS Identity Document.
§Examples
use oas_document::interop::{InteroperabilitySection, ProtocolSupport, ApiSchema};
let interop = InteroperabilitySection {
protocols: vec![
ProtocolSupport {
protocol: "mcp".to_string(),
version: Some("2025-01".to_string()),
endpoint: Some("https://agent.acme.com/mcp".to_string()),
},
ProtocolSupport {
protocol: "rest".to_string(),
version: None,
endpoint: Some("https://api.acme.com/v1".to_string()),
},
],
api_schemas: vec![ApiSchema {
schema_type: "openapi".to_string(),
url: "https://api.acme.com/v1/openapi.json".to_string(),
version: Some("3.1.0".to_string()),
}],
auth_methods: vec!["did-auth".to_string(), "api-key".to_string()],
};
assert_eq!(interop.protocols.len(), 2);Fields§
§protocols: Vec<ProtocolSupport>Protocols this entity supports.
api_schemas: Vec<ApiSchema>API schema references.
auth_methods: Vec<String>Authentication methods accepted: "did-auth", "api-key",
"oauth2", "mtls", "bearer-token".
Trait Implementations§
Source§impl Clone for InteroperabilitySection
impl Clone for InteroperabilitySection
Source§impl Debug for InteroperabilitySection
impl Debug for InteroperabilitySection
Source§impl<'de> Deserialize<'de> for InteroperabilitySection
impl<'de> Deserialize<'de> for InteroperabilitySection
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 InteroperabilitySection
Source§impl PartialEq for InteroperabilitySection
impl PartialEq for InteroperabilitySection
Source§impl Serialize for InteroperabilitySection
impl Serialize for InteroperabilitySection
impl StructuralPartialEq for InteroperabilitySection
Auto Trait Implementations§
impl Freeze for InteroperabilitySection
impl RefUnwindSafe for InteroperabilitySection
impl Send for InteroperabilitySection
impl Sync for InteroperabilitySection
impl Unpin for InteroperabilitySection
impl UnsafeUnpin for InteroperabilitySection
impl UnwindSafe for InteroperabilitySection
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