pub struct TpmParameters<'a> { /* private fields */ }Expand description
A helper for parsing data from a TPM parameter buffer, which is prefixed with a u32 size.
Implementations§
Source§impl<'a> TpmParameters<'a>
impl<'a> TpmParameters<'a>
Sourcepub fn new(buf: &'a [u8]) -> TpmResult<(Self, &'a [u8])>
pub fn new(buf: &'a [u8]) -> TpmResult<(Self, &'a [u8])>
Creates a new parameter buffer from a slice.
It reads a u32 size prefix, slices the buffer accordingly, and returns
the parameter buffer and the remainder of the original buffer.
§Errors
Returns TpmErrorKind::Boundary if the buffer is too small to contain
the size prefix or the data described by the size prefix.
Returns TpmErrorKind::ValueTooLarge if the size prefix exceeds TPM_MAX_COMMAND_SIZE.
Auto Trait Implementations§
impl<'a> Freeze for TpmParameters<'a>
impl<'a> RefUnwindSafe for TpmParameters<'a>
impl<'a> Send for TpmParameters<'a>
impl<'a> Sync for TpmParameters<'a>
impl<'a> Unpin for TpmParameters<'a>
impl<'a> UnwindSafe for TpmParameters<'a>
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