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
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl PartialEq for TpmProtocolError
impl PartialEq for TpmProtocolError
impl Copy for TpmProtocolError
impl Eq for TpmProtocolError
impl StructuralPartialEq for TpmProtocolError
Auto Trait Implementations§
impl Freeze for TpmProtocolError
impl RefUnwindSafe for TpmProtocolError
impl Send for TpmProtocolError
impl Sync for TpmProtocolError
impl Unpin for TpmProtocolError
impl UnwindSafe for TpmProtocolError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more