Enum trezor_client::client::common::TrezorResponse
source · 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
sourceimpl<'a, T, R: TrezorMessage> TrezorResponse<'a, T, R>
impl<'a, T, R: TrezorMessage> TrezorResponse<'a, T, R>
Get the button request object or an error if not ButtonRequest
.
sourcepub fn pin_matrix_request(self) -> Result<PinMatrixRequest<'a, T, R>>
pub fn pin_matrix_request(self) -> Result<PinMatrixRequest<'a, T, R>>
Get the PIN matrix request object or an error if not PinMatrixRequest
.
sourcepub fn passphrase_request(self) -> Result<PassphraseRequest<'a, T, R>>
pub fn passphrase_request(self) -> Result<PassphraseRequest<'a, T, R>>
Get the passphrase request object or an error if not PassphraseRequest
.
Trait Implementations
sourceimpl<'a, T: Debug, R: Debug + TrezorMessage> Debug for TrezorResponse<'a, T, R>
impl<'a, T: Debug, R: Debug + TrezorMessage> Debug for TrezorResponse<'a, T, R>
sourceimpl<'a, T, R: TrezorMessage> Display for TrezorResponse<'a, T, R>
impl<'a, T, R: TrezorMessage> Display for TrezorResponse<'a, T, R>
Auto Trait Implementations
impl<'a, T, R> !RefUnwindSafe for TrezorResponse<'a, T, R>
impl<'a, T, R> !Send for TrezorResponse<'a, T, R>
impl<'a, T, R> !Sync for TrezorResponse<'a, T, R>
impl<'a, T, R> Unpin for TrezorResponse<'a, T, R>where
T: Unpin,
impl<'a, T, R> !UnwindSafe for TrezorResponse<'a, T, R>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more