Debian Codegraph @

third_party/rust/mls-rs-crypto-traits/src/mock.rs

raw
1 // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2 // Copyright by contributors to this project.
3 // SPDX-License-Identifier: (Apache-2.0 OR MIT)
4
5 pub use crate::{
6 aead::MockAeadType, dh::MockDhType, kdf::MockKdfType, kem::MockKemType, MockHash,
7 MockVariableLengthHash,
8 };
9
10 #[derive(Debug)]
11 pub struct TestError {}
12
13 impl std::error::Error for TestError {}
14
15 impl std::fmt::Display for TestError {
16 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
17 f.write_str("TestError")
18 }
19 }
20
21 impl mls_rs_core::error::IntoAnyError for TestError {
22 fn into_dyn_error(self) -> Result<Box<dyn std::error::Error + Send + Sync>, Self> {
23 Ok(self.into())
24 }
25 }