qubit_codec_text/codec/unmappable_action.rs
1// =============================================================================
2// Copyright (c) 2026 Haixing Hu.
3//
4// SPDX-License-Identifier: Apache-2.0
5//
6// Licensed under the Apache License, Version 2.0.
7// =============================================================================
8/// Policy used when a character cannot be represented by the target charset.
9#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
10pub enum UnmappableAction {
11 /// Return the unmappable-character error to the caller.
12 Report,
13
14 /// Skip the unmappable character and continue.
15 Ignore,
16
17 /// Encode the configured replacement character instead.
18 #[default]
19 Replace,
20}