qubit_codec/byte_order/byte_order_spec.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 crate::ByteOrder;
10
11/// Describes a type-level byte order.
12///
13/// # Examples
14///
15/// ```
16/// use qubit_codec::{BigEndian, ByteOrder, ByteOrderSpec};
17///
18/// assert_eq!(BigEndian::ORDER, ByteOrder::BigEndian);
19/// ```
20pub trait ByteOrderSpec: Copy + Default {
21 /// Runtime value represented by this type-level byte order.
22 const ORDER: ByteOrder;
23}