Skip to main content

reallyme_crypto/secret_material/
owner.rs

1// SPDX-FileCopyrightText: Copyright © 2026 ReallyMe LLC. All rights reserved
2//
3// SPDX-License-Identifier: Apache-2.0
4
5/// Layer responsible for a material buffer at an operation boundary.
6#[derive(Debug, Clone, Copy, PartialEq, Eq)]
7#[non_exhaustive]
8pub enum BufferOwner {
9    /// The caller owns borrowed input storage.
10    Caller,
11    /// The semantic Rust operation owns a result or temporary.
12    OperationLayer,
13    /// The protobuf contract owns an encoded request or response buffer.
14    OperationContract,
15    /// A C ABI or JNI adapter owns native memory for a caller.
16    NativeAdapter,
17    /// A managed SDK/runtime owns memory Rust cannot deterministically wipe.
18    ManagedRuntime,
19    /// A platform provider owns non-exportable key material.
20    PlatformProvider,
21}