pub struct TpmErrorValue {
pub offset: usize,
pub value: u64,
pub needed: usize,
pub available: usize,
pub limit: usize,
pub actual: usize,
}Expand description
Additional structured data for a TPM protocol error.
Fields§
§offset: usizeByte offset from the start of the parsed buffer.
value: u64Raw value associated with the error.
needed: usizeRequired byte or item count.
available: usizeAvailable byte or item count.
limit: usizeMaximum allowed byte or item count.
actual: usizeActual byte or item count.
Implementations§
Source§impl TpmErrorValue
impl TpmErrorValue
Sourcepub const fn value_usize(self, value: usize) -> Self
pub const fn value_usize(self, value: usize) -> Self
Sets a raw usize value associated with the error.
Sourcepub const fn actual(self, actual: usize) -> Self
pub const fn actual(self, actual: usize) -> Self
Sets an actual count without a corresponding limit.
Sourcepub const fn size(self, needed: usize, available: usize) -> Self
pub const fn size(self, needed: usize, available: usize) -> Self
Sets the required and available counts.
Sourcepub const fn limit(self, limit: usize, actual: usize) -> Self
pub const fn limit(self, limit: usize, actual: usize) -> Self
Sets the maximum allowed and actual counts.
Trait Implementations§
Source§impl Clone for TpmErrorValue
impl Clone for TpmErrorValue
Source§fn clone(&self) -> TpmErrorValue
fn clone(&self) -> TpmErrorValue
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TpmErrorValue
Source§impl Debug for TpmErrorValue
impl Debug for TpmErrorValue
Source§impl Default for TpmErrorValue
impl Default for TpmErrorValue
Source§fn default() -> TpmErrorValue
fn default() -> TpmErrorValue
Returns the “default value” for a type. Read more
impl Eq for TpmErrorValue
Source§impl PartialEq for TpmErrorValue
impl PartialEq for TpmErrorValue
Source§fn eq(&self, other: &TpmErrorValue) -> bool
fn eq(&self, other: &TpmErrorValue) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TpmErrorValue
Auto Trait Implementations§
impl Freeze for TpmErrorValue
impl RefUnwindSafe for TpmErrorValue
impl Send for TpmErrorValue
impl Sync for TpmErrorValue
impl Unpin for TpmErrorValue
impl UnsafeUnpin for TpmErrorValue
impl UnwindSafe for TpmErrorValue
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