Skip to main content

qubit_codec_binary/codec/
strict.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
9use super::Leb128DecodePolicy;
10
11/// Marker type selecting strict decoding.
12#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
13pub struct Strict;
14
15impl super::sealed::Sealed for Strict {}
16
17impl Leb128DecodePolicy for Strict {
18    /// Whether this policy rejects non-canonical encodings.
19    const STRICT: bool = true;
20}