reallyme-crypto 0.3.2

Cross-platform cryptographic primitives, key formats, and conformance-tested provider bindings.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// SPDX-FileCopyrightText: Copyright © 2026 ReallyMe LLC. All rights reserved
//
// SPDX-License-Identifier: Apache-2.0

use crypto_proto::generated::proto::reallyme::crypto::v1::CryptoOperationResponse;
use crypto_proto::generated::proto::reallyme::crypto::v1::__buffa::oneof::crypto_operation_response::Outcome as CryptoOperationOutcome;
use crypto_proto::wire::CryptoWireError;

pub(crate) fn error_response(error: CryptoWireError) -> CryptoOperationResponse {
    CryptoOperationResponse {
        outcome: Some(CryptoOperationOutcome::Error(Box::new(error.to_proto()))),
        __buffa_unknown_fields: Default::default(),
    }
}