qubit_metadata/schema/unknown_field_policy.rs
1/*******************************************************************************
2 *
3 * Copyright (c) 2025 - 2026 Haixing Hu.
4 *
5 * SPDX-License-Identifier: Apache-2.0
6 *
7 * Licensed under the Apache License, Version 2.0.
8 *
9 ******************************************************************************/
10//! [`UnknownFieldPolicy`] — handling for schema-unknown metadata and filter keys.
11
12use serde::{Deserialize, Serialize};
13
14/// Policy for fields that appear in metadata or filters but are not declared by
15/// a schema.
16#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, Default)]
17pub enum UnknownFieldPolicy {
18 /// Reject fields that are not declared in the schema.
19 #[default]
20 Reject,
21 /// Allow fields that are not declared in the schema.
22 Allow,
23}