zr/opaque_bytes.rs
1// Copyright 2026 The Fuchsia Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5use crate::opaque::Opaque;
6
7/// A generic, safe opaque storage container with exact const size constraints.
8///
9/// This integrates with `Opaque<T>` to guarantee the Rust compiler knows the underlying memory
10/// is interior-mutable (via `UnsafeCell`) and potentially uninitialized (via `MaybeUninit`).
11pub type OpaqueBytes<const SIZE: usize> = Opaque<[u8; SIZE]>;