pub struct TpmtTkVerifiedWire(/* private fields */);Implementations§
Source§impl TpmtTkVerifiedWire
impl TpmtTkVerifiedWire
Sourcepub fn cast(buf: &[u8]) -> TpmResult<&Self>
pub fn cast(buf: &[u8]) -> TpmResult<&Self>
Casts bytes into a typed wire structure view.
§Errors
Returns Err(TpmError) when buf is not exactly one valid wire
structure.
Sourcepub fn cast_prefix(buf: &[u8]) -> TpmResult<(&Self, &[u8])>
pub fn cast_prefix(buf: &[u8]) -> TpmResult<(&Self, &[u8])>
Casts the first typed wire structure from buf and returns the remainder.
§Errors
Returns Err(TpmError) when buf does not start with a valid wire
structure.
Sourcepub unsafe fn cast_unchecked(buf: &[u8]) -> &Self
pub unsafe fn cast_unchecked(buf: &[u8]) -> &Self
Casts bytes into a typed wire structure view without validation.
§Safety
The caller must ensure buf is exactly one valid wire structure.
Sourcepub fn validate(buf: &[u8]) -> TpmResult<()>
pub fn validate(buf: &[u8]) -> TpmResult<()>
Validates an exact typed wire structure view.
§Errors
Returns Err(TpmError) when buf is not exactly one valid wire
structure.
Sourcepub fn validate_prefix(buf: &[u8]) -> TpmResult<usize>
pub fn validate_prefix(buf: &[u8]) -> TpmResult<usize>
Validates a typed wire structure prefix.
§Errors
Returns Err(TpmError) when buf does not start with a valid wire
structure.
Sourcepub fn tag(&self) -> TpmResult<&TpmSt>
pub fn tag(&self) -> TpmResult<&TpmSt>
Returns a borrowed field view.
§Errors
Returns Err(TpmError) when preceding fields or this field are malformed.
Sourcepub fn hierarchy(&self) -> TpmResult<&TpmRh>
pub fn hierarchy(&self) -> TpmResult<&TpmRh>
Returns a borrowed field view.
§Errors
Returns Err(TpmError) when preceding fields or this field are malformed.
Sourcepub fn digest(&self) -> TpmResult<&Tpm2bDigest>where
TpmSt: for<'a> TpmField<'a>,
TpmRh: for<'a> TpmField<'a>,
Tpm2bDigest: for<'a> TpmField<'a, View = &'a Tpm2bDigest>,
pub fn digest(&self) -> TpmResult<&Tpm2bDigest>where
TpmSt: for<'a> TpmField<'a>,
TpmRh: for<'a> TpmField<'a>,
Tpm2bDigest: for<'a> TpmField<'a, View = &'a Tpm2bDigest>,
Returns a borrowed field view.
§Errors
Returns Err(TpmError) when preceding fields or this field are malformed.