pub struct VersionDetails {
pub version: VersionNumber,
pub endpoints: Vec<Endpoint>,
pub extensions: Extensions,
}v2_3_0 only.Expand description
The endpoints a party implements for one version.
Spec: 2.3.0 §version_information_get_details_endpoint_data
Fields§
§version: VersionNumberThe version number these endpoints belong to.
endpoints: Vec<Endpoint>The supported endpoints for this version. Cardinality +.
extensions: ExtensionsUndocumented JSON fields, preserved verbatim.
Implementations§
Source§impl VersionDetails
impl VersionDetails
Sourcepub fn new(version: VersionNumber, endpoints: Vec<Endpoint>) -> Self
pub fn new(version: VersionNumber, endpoints: Vec<Endpoint>) -> Self
Creates version details.
Sourcepub fn endpoint(
&self,
module: &ModuleId,
role: InterfaceRole,
) -> Option<&Endpoint>
pub fn endpoint( &self, module: &ModuleId, role: InterfaceRole, ) -> Option<&Endpoint>
The endpoint for a module and interface role, if the peer implements it.
Module identifiers are matched case-insensitively, which matters for the Booking module:
the spec writes it in mixed case and implementations differ. See
ModuleId::matches.
Sourcepub fn url(&self, module: &ModuleId, role: InterfaceRole) -> Option<&Url>
pub fn url(&self, module: &ModuleId, role: InterfaceRole) -> Option<&Url>
The URL of a module’s endpoint for one interface role.
Sourcepub fn credentials_url(&self) -> Option<&Url>
pub fn credentials_url(&self) -> Option<&Url>
The credentials endpoint.
NOTE: for the
credentialsmodule, the value of the role property is not relevant as this module is the same for all roles. It is advised to send “SENDER” as the InterfaceRole for one’s own credentials endpoint and to disregard the value of the role property of the Endpoint object for other platforms’ credentials modules.
So this ignores the role entirely, as the spec instructs.
Sourcepub fn missing(
&self,
required: &[(ModuleId, InterfaceRole)],
) -> Vec<(ModuleId, InterfaceRole)>
pub fn missing( &self, required: &[(ModuleId, InterfaceRole)], ) -> Vec<(ModuleId, InterfaceRole)>
Whether the peer implements every module in required, in the given role.
In case the Sender (starting the credentials exchange process) cannot find the endpoints it expects, it is expected NOT to send the POST request with credentials to the Receiver.
Spec: 2.3.0 §credentials_required_endpoints_not_available
Trait Implementations§
Source§impl Clone for VersionDetails
impl Clone for VersionDetails
Source§fn clone(&self) -> VersionDetails
fn clone(&self) -> VersionDetails
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for VersionDetails
impl Debug for VersionDetails
Source§impl<'de> Deserialize<'de> for VersionDetails
impl<'de> Deserialize<'de> for VersionDetails
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>,
Source§impl JsonSchema for VersionDetails
impl JsonSchema for VersionDetails
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more