qubit-metadata 0.3.0

Type-safe extensible metadata model for the Qubit LLM SDK
Documentation
/*******************************************************************************
 *
 *    Copyright (c) 2025 - 2026.
 *    Haixing Hu, Qubit Co. Ltd.
 *
 *    All rights reserved.
 *
 ******************************************************************************/
//! [`UnknownFieldPolicy`] — handling for schema-unknown metadata keys.

use serde::{Deserialize, Serialize};

/// Policy for fields that appear in metadata but are not declared by a schema.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, Default)]
pub enum UnknownFieldPolicy {
    /// Reject fields that are not declared in the schema.
    #[default]
    Reject,
    /// Allow fields that are not declared in the schema.
    Allow,
}