core_crypto/mls/
error.rs

1//! MLS errors
2
3// We allow missing documentation in the error module because the types are generally self-descriptive.
4#![allow(missing_docs)]
5
6pub type Result<T, E = Error> = core::result::Result<T, E>;
7
8#[derive(Debug, thiserror::Error)]
9pub enum Error {
10    #[error("Couldn't find client")]
11    ClientNotFound(crate::prelude::ClientId),
12    /// The ciphersuite identifier presented does not map to a known ciphersuite.
13    #[error("Unknown ciphersuite")]
14    UnknownCiphersuite,
15    #[error("Malformed or empty identifier found: {0}")]
16    MalformedIdentifier(&'static str),
17    #[error(transparent)]
18    Keystore(#[from] crate::KeystoreError),
19    #[error(transparent)]
20    Mls(#[from] crate::MlsError),
21    #[error("{0}")]
22    Leaf(#[from] crate::LeafError),
23    #[error(transparent)]
24    Recursive(#[from] crate::RecursiveError),
25}