pub enum TrezorResponse<'a, T, R: TrezorMessage> {
    Ok(T),
    Failure(Failure),
    ButtonRequest(ButtonRequest<'a, T, R>),
    PinMatrixRequest(PinMatrixRequest<'a, T, R>),
    PassphraseRequest(PassphraseRequest<'a, T, R>),
}
Expand description

A response from a Trezor device. On every message exchange, instead of the expected/desired response, the Trezor can ask for some user interaction, or can send a failure.

Variants

Ok(T)

Failure(Failure)

ButtonRequest(ButtonRequest<'a, T, R>)

PinMatrixRequest(PinMatrixRequest<'a, T, R>)

PassphraseRequest(PassphraseRequest<'a, T, R>)

Implementations

Get the actual Ok response value or an error if not Ok.

Get the button request object or an error if not ButtonRequest.

Get the PIN matrix request object or an error if not PinMatrixRequest.

Get the passphrase request object or an error if not PassphraseRequest.

Trait Implementations

Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.