parsec_interface/operations/
list_keys.rs

1// Copyright 2020 Contributors to the Parsec project.
2// SPDX-License-Identifier: Apache-2.0
3//! # ListKeys operation
4//!
5//! Lists all keys belonging to the application.
6use super::psa_key_attributes::Attributes;
7use crate::requests::ProviderId;
8
9/// Structure holding the basic information for a key in the application for client discovery.
10#[derive(Debug, Clone, PartialEq, Eq)]
11pub struct KeyInfo {
12    /// The ID of the associated provider.
13    pub provider_id: ProviderId,
14    /// The name of the key.
15    pub name: String,
16    /// The key attributes.
17    pub attributes: Attributes,
18}
19
20/// Native object for key listing operation.
21#[derive(Copy, Clone, Debug)]
22pub struct Operation;
23
24/// Native object for key listing result.
25#[derive(Debug)]
26pub struct Result {
27    /// A list of `KeyInfo` structures.
28    pub keys: Vec<KeyInfo>,
29}