You've already forked ctap-types
mirror of
https://github.com/trussed-dev/ctap-types.git
synced 2026-06-20 04:16:17 -07:00
ctap2: Set repr(u8) for Error and implement From<Error> for u8
Fixes: https://github.com/trussed-dev/ctap-types/issues/63
This commit is contained in:
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- Remove unused `Rpc` trait.
|
||||
- Remove `cbor-smol` re-export as `serde`.
|
||||
- Make `ctap2::CtapMappingError` private.
|
||||
- Set `#[repr(u8)]` for `ctap2::Error` and implement `From<ctap2::Error>` for `u8`.
|
||||
|
||||
## [0.6.0-rc.4] 2026-06-01
|
||||
|
||||
|
||||
@@ -444,6 +444,7 @@ impl<'de> Deserialize<'de> for AttestationFormatsPreference {
|
||||
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
||||
#[non_exhaustive]
|
||||
#[repr(u8)]
|
||||
pub enum Error {
|
||||
Success = 0x00,
|
||||
InvalidCommand = 0x01,
|
||||
@@ -502,6 +503,12 @@ pub enum Error {
|
||||
VendorLast = 0xFF,
|
||||
}
|
||||
|
||||
impl From<Error> for u8 {
|
||||
fn from(error: Error) -> u8 {
|
||||
error as _
|
||||
}
|
||||
}
|
||||
|
||||
/// CTAP2 authenticator API
|
||||
pub trait Authenticator {
|
||||
fn get_info(&mut self) -> get_info::Response;
|
||||
|
||||
Reference in New Issue
Block a user