// Copyright 2025-Present Datadog, Inc. https://www.datadoghq.com/
// SPDX-License-Identifier: Apache-2.0
/// A trait to represent a static error message that is represented by both
/// the requirements of Rust strings and C strings:
///
/// 1. It must be a null terminated string with no interior null bytes.
/// 2. It must be valid UTF-8.
/// 3. It must not allocate to achieve the static bounds.
///
/// Using a c-str literal in Rust achieves all these requirements:
///
/// ```
/// c"this string is compatible with FfiSafeErrorMessage";
/// ```
///
/// # Safety
///
/// The strings returned by `as_ffi_str` must be valid UTF-8.
pub unsafe