pub trait TpmResponseBodyParse: Sized {
// Required method
fn parse_body(tag: TpmSt, buf: &[u8]) -> TpmResult<(Self, &[u8])>;
}Expand description
Parses a response body using the response tag to handle structural variations.
Required Methods§
Sourcefn parse_body(tag: TpmSt, buf: &[u8]) -> TpmResult<(Self, &[u8])>
fn parse_body(tag: TpmSt, buf: &[u8]) -> TpmResult<(Self, &[u8])>
Parses the response body from a buffer, using the response tag dynamically to determine the structure.
§Errors
This method can return parsing errors such as:
TpmErrorKind::ParseUnderflowif the buffer is too small.TpmErrorKind::TrailingDataif the buffer has unconsumed data after parsing.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.