pub enum TpmProtocolError {
BufferOverflow,
IntegerTooLarge,
InvalidBoolean,
InvalidCc,
InvalidMagicNumber,
InvalidTag,
TooManyBytes,
TooManyItems,
TrailingData,
UnexpectedEnd,
VariantNotAvailable,
}Expand description
TPM frame marshaling and unmarshaling error type containing variants for all the possible error conditions.
Variants§
BufferOverflow
Trying to marshal more bytes than buffer has space. This is unexpected situation, and should be considered possible bug in the crate itself.
IntegerTooLarge
Integer overflow while converting to an integer of a different size.
InvalidBoolean
Boolean value was expected but the value is neither 0 nor 1.
InvalidCc
Non-existent command code encountered.
InvalidMagicNumber
An TpmAttest instance contains an invalid
magic value.
InvalidTag
Tag is neither Sessions nor
NoSessions.
TooManyBytes
Buffer contains more bytes than allowed by the TCG specifications.
TooManyItems
List contains more items than allowed by the TCG specifications.
TrailingData
Trailing data left after unmarshaling.
UnexpectedEnd
Run out of bytes while unmarshaling.
VariantNotAvailable
The variant accessed is not available.
Trait Implementations§
Source§impl Clone for TpmProtocolError
impl Clone for TpmProtocolError
Source§fn clone(&self) -> TpmProtocolError
fn clone(&self) -> TpmProtocolError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TpmProtocolError
impl Debug for TpmProtocolError
Source§impl Display for TpmProtocolError
impl Display for TpmProtocolError
Source§impl Error for TpmProtocolError
impl Error for TpmProtocolError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for TpmProtocolError
impl PartialEq for TpmProtocolError
Source§fn eq(&self, other: &TpmProtocolError) -> bool
fn eq(&self, other: &TpmProtocolError) -> bool
self and other values to be equal, and is used by ==.