Skip to main content

qubit_metadata/
metadata_wire_limit_kind.rs

1// =============================================================================
2//    Copyright (c) 2025 - 2026 Haixing Hu.
3//
4//    SPDX-License-Identifier: Apache-2.0
5//
6//    Licensed under the Apache License, Version 2.0.
7// =============================================================================
8//! Resource categories used by the metadata V1 wire contract.
9
10/// A metadata resource category bounded by the strict V1 wire contract.
11///
12/// # Examples
13///
14/// ```
15/// use qubit_metadata::MetadataWireLimitKind;
16///
17/// assert_eq!(MetadataWireLimitKind::Entries, MetadataWireLimitKind::Entries);
18/// ```
19#[derive(Debug, Clone, Copy, PartialEq, Eq)]
20#[non_exhaustive]
21pub enum MetadataWireLimitKind {
22    /// Number of metadata entries or schema fields.
23    Entries,
24    /// UTF-8 byte length of a metadata or schema key.
25    KeyBytes,
26}