pub enum TpmError {
BufferOverflow(TpmErrorValue),
IntegerTooLarge(TpmErrorValue),
InvalidBoolean(TpmErrorValue),
InvalidCc(TpmErrorValue),
InvalidMagicNumber(TpmErrorValue),
InvalidRc(TpmErrorValue),
InvalidTag(TpmErrorValue),
TooManyBytes(TpmErrorValue),
TooManyItems(TpmErrorValue),
TrailingData(TpmErrorValue),
UnexpectedEnd(TpmErrorValue),
VariantNotAvailable(TpmErrorValue),
}Expand description
TPM frame marshaling and unmarshaling error type.
Every variant carries TpmErrorValue with the byte offset and any
applicable raw value, size, or limit information.
Variants§
BufferOverflow(TpmErrorValue)
Trying to marshal more bytes than buffer has space. This is unexpected situation, and should be considered possible bug in the crate itself.
IntegerTooLarge(TpmErrorValue)
Integer overflow while converting to an integer of a different size.
InvalidBoolean(TpmErrorValue)
Boolean value was expected but the value is neither 0 nor 1.
InvalidCc(TpmErrorValue)
Non-existent command code encountered.
InvalidMagicNumber(TpmErrorValue)
An TpmAttest instance contains an invalid
magic value.
InvalidRc(TpmErrorValue)
Invalid TPM response code encountered.
InvalidTag(TpmErrorValue)
Tag is neither Sessions nor
NoSessions.
TooManyBytes(TpmErrorValue)
Buffer contains more bytes than allowed by the TCG specifications.
TooManyItems(TpmErrorValue)
List contains more items than allowed by the TCG specifications.
TrailingData(TpmErrorValue)
Trailing data left after unmarshaling.
UnexpectedEnd(TpmErrorValue)
Run out of bytes while unmarshaling.
VariantNotAvailable(TpmErrorValue)
The variant accessed is not available.
Implementations§
Trait Implementations§
impl Copy for TpmError
impl Eq for TpmError
Source§impl Error for TpmError
impl Error for TpmError
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()