pub trait CBORCommand: Serialize + Sized + Debug + Send {
    type Response: CBORResponse;

    const CMD: u8;
    const HAS_PAYLOAD: bool = true;

    // Provided method
    fn cbor(&self) -> Result<Vec<u8>, Error> { ... }
}
Available on crate feature ctap2 only.
Expand description

Common trait for all CBOR commands.

This handles some of the command serialization process.

Required Associated Types§

source

type Response: CBORResponse

The response type associated with this command.

Required Associated Constants§

source

const CMD: u8

CTAP comand byte

Provided Associated Constants§

source

const HAS_PAYLOAD: bool = true

If true (default), then the command has a payload, which will be serialized into CBOR format.

If false, then the command has no payload.

Provided Methods§

source

fn cbor(&self) -> Result<Vec<u8>, Error>

Converts a CTAP v2 command into a binary form.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl CBORCommand for BioEnrollmentRequest

Available on crate feature ctap2-management only.
source§

impl CBORCommand for ClientPinRequest

source§

impl CBORCommand for ConfigRequest

Available on crate feature ctap2-management only.
source§

const CMD: u8 = 13u8

§

type Response = NoResponse

source§

impl CBORCommand for CredentialManagementRequest

Available on crate feature ctap2-management only.
source§

impl CBORCommand for GetAssertionRequest

source§

impl CBORCommand for GetInfoRequest

source§

impl CBORCommand for MakeCredentialRequest

source§

impl CBORCommand for PrototypeBioEnrollmentRequest

Available on crate feature ctap2-management only.
source§

impl CBORCommand for PrototypeCredentialManagementRequest

Available on crate feature ctap2-management only.
source§

impl CBORCommand for ResetRequest

Available on crate feature ctap2-management only.
source§

const CMD: u8 = 7u8

source§

const HAS_PAYLOAD: bool = false

§

type Response = NoResponse

source§

impl CBORCommand for SelectionRequest

source§

const CMD: u8 = 11u8

source§

const HAS_PAYLOAD: bool = false

§

type Response = NoResponse