parsec_interface/operations/
list_opcodes.rs

1// Copyright 2019 Contributors to the Parsec project.
2// SPDX-License-Identifier: Apache-2.0
3//! # ListOpcodes operation
4//!
5//! List the opcodes supported by the provider.
6
7use crate::requests::{Opcode, ProviderId};
8use std::collections::HashSet;
9
10/// Native object for opcode listing operation.
11#[derive(Copy, Clone, Debug)]
12pub struct Operation {
13    /// Provider for which the supported opcodes are requsted.
14    pub provider_id: ProviderId,
15}
16
17/// Native object for opcode listing result.
18#[derive(Debug)]
19pub struct Result {
20    /// `opcodes` holds a list of opcodes supported by the provider identified in
21    /// the request.
22    pub opcodes: HashSet<Opcode>,
23}