hsmtool/util/attribute/
error.rs1use super::AttributeType;
6use cryptoki::object::Attribute;
7use thiserror::Error;
8
9#[derive(Debug, Error)]
10pub enum AttributeError {
11 #[error("Invalid data type")]
12 InvalidDataType,
13 #[error("Encoding error")]
14 EncodingError,
15 #[error("Unknown attribute: {0:?}")]
16 UnknownAttribute(Attribute),
17 #[error("Unknown attribute type: {0:?}")]
18 UnknownAttributeType(AttributeType),
19 #[error("Attribute not found: {0:?}")]
20 AttributeNotFound(AttributeType),
21}