CBORCommand

Trait CBORCommand 

Source
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 features ctap2 only.
Expand description

Common trait for all CBOR commands.

This handles some of the command serialization process.

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.

Required Associated Types§

Source

type Response: CBORResponse

The response type associated with this command.

Provided Methods§

Source

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

Converts a CTAP v2 command into a binary form.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl CBORCommand for BioEnrollmentRequest

Available on crate features ctap2-management only.
Source§

impl CBORCommand for ClientPinRequest

Source§

impl CBORCommand for ConfigRequest

Available on crate features ctap2-management only.
Source§

impl CBORCommand for CredentialManagementRequest

Available on crate features 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 features ctap2-management only.
Source§

impl CBORCommand for PrototypeCredentialManagementRequest

Available on crate features ctap2-management only.
Source§

impl CBORCommand for ResetRequest

Available on crate features ctap2-management only.
Source§

impl CBORCommand for SelectionRequest