qubit_codec_text/codec/malformed_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 input units do not form a valid character.
9#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
10pub enum MalformedAction {
11 /// Return the decoding error to the caller.
12 Report,
13
14 /// Skip the malformed input units and continue.
15 Ignore,
16
17 /// Emit the configured replacement character and continue.
18 #[default]
19 Replace,
20}