parsec_interface/operations/list_providers.rs
1// Copyright 2019 Contributors to the Parsec project.
2// SPDX-License-Identifier: Apache-2.0
3//! # ListProviders operation
4//!
5//! List the providers available in the service, with some information.
6use crate::requests::ProviderId;
7use std::cmp::Eq;
8pub use uuid::Uuid;
9
10/// Structure holding the basic information that defines the providers in
11/// the service for client discovery.
12#[derive(Debug, Clone, PartialEq, Eq, Hash)]
13pub struct ProviderInfo {
14 /// Unique, permanent, identifier of the provider.
15 pub uuid: Uuid,
16 /// Short description of the provider.
17 pub description: String,
18 /// Provider vendor.
19 pub vendor: String,
20 /// Provider implementation version major.
21 pub version_maj: u32,
22 /// Provider implementation version minor.
23 pub version_min: u32,
24 /// Provider implementation version revision number.
25 pub version_rev: u32,
26 /// Provider ID to use on the wire protocol to communicate with this provider.
27 pub id: ProviderId,
28}
29
30/// Native object for provider listing operation.
31#[derive(Copy, Clone, Debug)]
32pub struct Operation;
33
34/// Native object for provider listing result.
35#[derive(Debug)]
36pub struct Result {
37 /// A list of `ProviderInfo` structures, one for each provider available in
38 /// the service.
39 pub providers: Vec<ProviderInfo>,
40}