pub enum Error {
Show 21 variants NoDeviceFound, DeviceNotUnique, TransportConnect(Error), TransportBeginSession(Error), TransportEndSession(Error), TransportSendMessage(Error), TransportReceiveMessage(Error), UnexpectedMessageType(MessageType), Protobuf(ProtobufError), FailureResponse(Failure), UnexpectedInteractionRequest(InteractionType), Base58(Error), UnsupportedNetwork, InvalidEntropy, TxRequestInvalidIndex(usize), TxRequestUnknownTxid(Hash), PsbtMissingInputTx(Hash), MalformedTxRequest(TxRequest), InvalidPsbt(String), BitcoinEncode(Error), Secp256k1(Error),
}
Expand description

Trezor error.

Variants

NoDeviceFound

Less than one device was plugged in.

DeviceNotUnique

More than one device was plugged in.

TransportConnect(Error)

Transport error connecting to device.

TransportBeginSession(Error)

Transport error while beginning a session.

TransportEndSession(Error)

Transport error while ending a session.

TransportSendMessage(Error)

Transport error while sending a message.

TransportReceiveMessage(Error)

Transport error while receiving a message.

UnexpectedMessageType(MessageType)

Received an unexpected message type from the device.

Protobuf(ProtobufError)

Error reading or writing protobuf messages.

FailureResponse(Failure)

A failure message was returned by the device.

UnexpectedInteractionRequest(InteractionType)

An unexpected interaction request was returned by the device.

Base58(Error)

Error in Base58 decoding

UnsupportedNetwork

The given Bitcoin network is not supported.

InvalidEntropy

Provided entropy is not 32 bytes.

TxRequestInvalidIndex(usize)

The device referenced a non-existing input or output index.

TxRequestUnknownTxid(Hash)

The device referenced an unknown TXID.

PsbtMissingInputTx(Hash)

The PSBT is missing the full tx for given input.

MalformedTxRequest(TxRequest)

Device produced invalid TxRequest message.

InvalidPsbt(String)

User provided invalid PSBT.

BitcoinEncode(Error)

Error encoding/decoding a Bitcoin data structure.

Secp256k1(Error)

Elliptic curve crypto error.

Trait Implementations

Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
The lower-level source of this error, if any. Read more
👎Deprecated since 1.42.0: use the Display impl or to_string()
🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.

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.

🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to provide by using demand. Read more
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.