pub trait TpmParse: Sized + TpmSized {
// Required method
fn parse(buf: &[u8]) -> TpmResult<(Self, &[u8])>;
}Required Methods§
Sourcefn parse(buf: &[u8]) -> TpmResult<(Self, &[u8])>
fn parse(buf: &[u8]) -> TpmResult<(Self, &[u8])>
Parses an object from the given buffer.
Returns the parsed type and the remaining portion of the buffer.
§Errors
TpmErrorKind::Boundaryif the buffer is too small to contain the object.TpmErrorKind::NotDiscriminantif a value in the buffer is invalid for the target type.
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.