Trait TpmSized

Source
pub trait TpmSized {
    const SIZE: usize;

    // Required method
    fn len(&self) -> usize;

    // Provided method
    fn is_empty(&self) -> bool { ... }
}
Expand description

Provides two ways to determine the size of an object: a compile-time maximum and a runtime exact size.

Required Associated Constants§

Source

const SIZE: usize

The estimated size of the object in its serialized form evaluated at compile-time (always larger than the realized length).

Required Methods§

Source

fn len(&self) -> usize

Returns the exact serialized size of the object.

Provided Methods§

Source

fn is_empty(&self) -> bool

Returns true if the object has a serialized length of zero.

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.

Implementations on Foreign Types§

Source§

impl TpmSized for i32

Source§

const SIZE: usize = 4usize

Source§

fn len(&self) -> usize

Source§

impl TpmSized for u8

Source§

const SIZE: usize = 1usize

Source§

fn len(&self) -> usize

Source§

impl TpmSized for u16

Source§

const SIZE: usize = 2usize

Source§

fn len(&self) -> usize

Source§

impl TpmSized for u32

Source§

const SIZE: usize = 4usize

Source§

fn len(&self) -> usize

Source§

impl TpmSized for u64

Source§

const SIZE: usize = 8usize

Source§

fn len(&self) -> usize

Implementors§

Source§

impl TpmSized for TpmAlgId

Source§

const SIZE: usize = 2usize

Source§

impl TpmSized for TpmCap

Source§

const SIZE: usize = 4usize

Source§

impl TpmSized for TpmCc

Source§

const SIZE: usize = 4usize

Source§

impl TpmSized for TpmEccCurve

Source§

const SIZE: usize = 2usize

Source§

impl TpmSized for TpmRcBase

Source§

const SIZE: usize = 4usize

Source§

impl TpmSized for TpmRh

Source§

const SIZE: usize = 4usize

Source§

impl TpmSized for TpmSe

Source§

const SIZE: usize = 1usize

Source§

impl TpmSized for TpmSt

Source§

const SIZE: usize = 2usize

Source§

impl TpmSized for TpmuAttest

Source§

const SIZE: usize = 4_096usize

Source§

impl TpmSized for TpmuCapabilities

Source§

const SIZE: usize = 4_096usize

Source§

impl TpmSized for TpmuHa

Source§

const SIZE: usize = 64usize

Source§

impl TpmSized for TpmuPublicId

Source§

const SIZE: usize = 4_096usize

Source§

impl TpmSized for TpmuPublicParms

Source§

const SIZE: usize = 4_096usize

Source§

impl TpmSized for TpmuSensitiveComposite

Source§

const SIZE: usize = 4_096usize

Source§

impl TpmSized for TpmuSymKeyBits

Source§

const SIZE: usize = 2usize

Source§

impl TpmSized for TpmuSymMode

Source§

const SIZE: usize = 2usize

Source§

impl TpmSized for Tpm2bAttest

Source§

const SIZE: usize = 4_098usize

Source§

impl TpmSized for Tpm2bContextData

Source§

const SIZE: usize = 4_300usize

Source§

impl TpmSized for Tpm2bCreationData

Source§

const SIZE: usize = 517usize

Source§

impl TpmSized for Tpm2bEccPoint

Source§

const SIZE: usize = 138usize

Source§

impl TpmSized for Tpm2bIdObject

Source§

const SIZE: usize = 134usize

Source§

impl TpmSized for Tpm2bNvPublic

Source§

const SIZE: usize = 80usize

Source§

impl TpmSized for Tpm2bPublic

Source§

const SIZE: usize = 4_098usize

Source§

impl TpmSized for Tpm2bSensitive

Source§

const SIZE: usize = 4_232usize

Source§

impl TpmSized for Tpm2bSensitiveCreate

Source§

const SIZE: usize = 326usize

Source§

impl TpmSized for Tpm2bTemplate

Source§

const SIZE: usize = 4_098usize

Source§

impl TpmSized for TpmaAlgorithm

Source§

const SIZE: usize = 4usize

Source§

impl TpmSized for TpmaLocality

Source§

const SIZE: usize = 1usize

Source§

impl TpmSized for TpmaNv

Source§

const SIZE: usize = 4usize

Source§

impl TpmSized for TpmaObject

Source§

const SIZE: usize = 4usize

Source§

impl TpmSized for TpmaSession

Source§

const SIZE: usize = 1usize

Source§

impl TpmSized for TpmiYesNo

Source§

const SIZE: usize = 1usize

Source§

impl TpmSized for TpmsAlgProperty

Source§

const SIZE: usize = 6usize

Source§

impl TpmSized for TpmsAttest

Source§

const SIZE: usize = 4_096usize

Source§

impl TpmSized for TpmsAuthCommand

Source§

const SIZE: usize = 137usize

Source§

impl TpmSized for TpmsAuthResponse

Source§

const SIZE: usize = 133usize

Source§

impl TpmSized for TpmsCapabilityData

Source§

const SIZE: usize = 4_100usize

Source§

impl TpmSized for TpmsCertifyInfo

Source§

const SIZE: usize = 136usize

Source§

impl TpmSized for TpmsClockInfo

Source§

const SIZE: usize = 17usize

Source§

impl TpmSized for TpmsCommandAuditInfo

Source§

const SIZE: usize = 142usize

Source§

impl TpmSized for TpmsContext

Source§

const SIZE: usize = 4_114usize

Source§

impl TpmSized for TpmsContextData

Source§

const SIZE: usize = 4_298usize

Source§

impl TpmSized for TpmsCreationData

Source§

const SIZE: usize = 515usize

Source§

impl TpmSized for TpmsCreationInfo

Source§

const SIZE: usize = 134usize

Source§

impl TpmSized for TpmsEccPoint

Source§

const SIZE: usize = 136usize

Source§

impl TpmSized for TpmsEmpty

Source§

const SIZE: usize = 0usize

Source§

impl TpmSized for TpmsIdObject

Source§

const SIZE: usize = 132usize

Source§

impl TpmSized for TpmsKeyedhashParms

Source§

const SIZE: usize = 2usize

Source§

impl TpmSized for TpmsNvCertifyInfo

Source§

const SIZE: usize = 2_120usize

Source§

impl TpmSized for TpmsNvPublic

Source§

const SIZE: usize = 78usize

Source§

impl TpmSized for TpmsPcrSelection

Source§

const SIZE: usize = 6usize

Source§

impl TpmSized for TpmsQuoteInfo

Source§

const SIZE: usize = 118usize

Source§

impl TpmSized for TpmsSensitiveCreate

Source§

const SIZE: usize = 324usize

Source§

impl TpmSized for TpmsSessionAuditInfo

Source§

const SIZE: usize = 67usize

Source§

impl TpmSized for TpmsSymcipherParms

Source§

const SIZE: usize = 6usize

Source§

impl TpmSized for TpmsTimeAttestInfo

Source§

const SIZE: usize = 33usize

Source§

impl TpmSized for TpmsTimeInfo

Source§

const SIZE: usize = 25usize

Source§

impl TpmSized for TpmtHa

Source§

const SIZE: usize = 66usize

Source§

impl TpmSized for TpmtKdfScheme

Source§

const SIZE: usize = 2usize

Source§

impl TpmSized for TpmtPublic

Source§

const SIZE: usize = 4_096usize

Source§

impl TpmSized for TpmtScheme

Source§

const SIZE: usize = 2usize

Source§

impl TpmSized for TpmtSensitive

Source§

const SIZE: usize = 4_230usize

Source§

impl TpmSized for TpmtSymDef

Source§

const SIZE: usize = 6usize

Source§

impl TpmSized for TpmtTkAuth

Source§

const SIZE: usize = 72usize

Source§

impl TpmSized for TpmtTkCreation

Source§

const SIZE: usize = 72usize

Source§

impl TpmSized for TpmtTkHashcheck

Source§

const SIZE: usize = 72usize

Source§

impl TpmSized for TpmContextLoadCommand

Source§

const SIZE: usize = 4_114usize

Source§

impl TpmSized for TpmContextLoadResponse

Source§

const SIZE: usize = 4usize

Source§

impl TpmSized for TpmContextSaveCommand

Source§

const SIZE: usize = 0usize

Source§

impl TpmSized for TpmContextSaveResponse

Source§

const SIZE: usize = 4_114usize

Source§

impl TpmSized for TpmCreateCommand

Source§

const SIZE: usize = 8_574usize

Source§

impl TpmSized for TpmCreatePrimaryCommand

Source§

const SIZE: usize = 8_574usize

Source§

impl TpmSized for TpmCreatePrimaryResponse

Source§

const SIZE: usize = 4_825usize

Source§

impl TpmSized for TpmCreateResponse

Source§

const SIZE: usize = 6_163usize

Source§

impl TpmSized for TpmDictionaryAttackLockResetCommand

Source§

const SIZE: usize = 0usize

Source§

impl TpmSized for TpmDictionaryAttackLockResetResponse

Source§

const SIZE: usize = 0usize

Source§

impl TpmSized for TpmEvictControlCommand

Source§

const SIZE: usize = 4usize

Source§

impl TpmSized for TpmEvictControlResponse

Source§

const SIZE: usize = 0usize

Source§

impl TpmSized for TpmFlushContextCommand

Source§

const SIZE: usize = 4usize

Source§

impl TpmSized for TpmFlushContextResponse

Source§

const SIZE: usize = 0usize

Source§

impl TpmSized for TpmGetCapabilityCommand

Source§

const SIZE: usize = 12usize

Source§

impl TpmSized for TpmGetCapabilityResponse

Source§

const SIZE: usize = 4_101usize

Source§

impl TpmSized for TpmHashCommand

Source§

const SIZE: usize = 1_032usize

Source§

impl TpmSized for TpmHashResponse

Source§

const SIZE: usize = 138usize

Source§

impl TpmSized for TpmImportCommand

Source§

const SIZE: usize = 9_680usize

Source§

impl TpmSized for TpmImportResponse

Source§

const SIZE: usize = 1_410usize

Source§

impl TpmSized for TpmLoadCommand

Source§

const SIZE: usize = 5_508usize

Source§

impl TpmSized for TpmLoadResponse

Source§

const SIZE: usize = 72usize

Source§

impl TpmSized for TpmObjectChangeAuthCommand

Source§

const SIZE: usize = 66usize

Source§

impl TpmSized for TpmObjectChangeAuthResponse

Source§

const SIZE: usize = 1_410usize

Source§

impl TpmSized for TpmPcrEventCommand

Source§

const SIZE: usize = 4_098usize

Source§

impl TpmSized for TpmPcrEventResponse

Source§

const SIZE: usize = 532usize

Source§

impl TpmSized for TpmPcrReadCommand

Source§

const SIZE: usize = 52usize

Source§

impl TpmSized for TpmPcrReadResponse

Source§

const SIZE: usize = 588usize

Source§

impl TpmSized for TpmPolicyAuthValueCommand

Source§

const SIZE: usize = 0usize

Source§

impl TpmSized for TpmPolicyAuthValueResponse

Source§

const SIZE: usize = 0usize

Source§

impl TpmSized for TpmPolicyCommandCodeCommand

Source§

const SIZE: usize = 4usize

Source§

impl TpmSized for TpmPolicyCommandCodeResponse

Source§

const SIZE: usize = 0usize

Source§

impl TpmSized for TpmPolicyGetDigestCommand

Source§

const SIZE: usize = 0usize

Source§

impl TpmSized for TpmPolicyGetDigestResponse

Source§

const SIZE: usize = 66usize

Source§

impl TpmSized for TpmPolicyOrCommand

Source§

const SIZE: usize = 532usize

Source§

impl TpmSized for TpmPolicyOrResponse

Source§

const SIZE: usize = 0usize

Source§

impl TpmSized for TpmPolicyPasswordCommand

Source§

const SIZE: usize = 0usize

Source§

impl TpmSized for TpmPolicyPasswordResponse

Source§

const SIZE: usize = 0usize

Source§

impl TpmSized for TpmPolicyPcrCommand

Source§

const SIZE: usize = 118usize

Source§

impl TpmSized for TpmPolicyPcrResponse

Source§

const SIZE: usize = 0usize

Source§

impl TpmSized for TpmPolicyRestartCommand

Source§

const SIZE: usize = 0usize

Source§

impl TpmSized for TpmPolicyRestartResponse

Source§

const SIZE: usize = 0usize

Source§

impl TpmSized for TpmPolicySecretCommand

Source§

const SIZE: usize = 8_266usize

Source§

impl TpmSized for TpmPolicySecretResponse

Source§

const SIZE: usize = 0usize

Source§

impl TpmSized for TpmReadPublicCommand

Source§

const SIZE: usize = 0usize

Source§

impl TpmSized for TpmReadPublicResponse

Source§

const SIZE: usize = 4_234usize

Source§

impl TpmSized for TpmStartAuthSessionCommand

Source§

const SIZE: usize = 8_205usize

Source§

impl TpmSized for TpmStartAuthSessionResponse

Source§

const SIZE: usize = 4_102usize

Source§

impl TpmSized for TpmUnsealCommand

Source§

const SIZE: usize = 0usize

Source§

impl TpmSized for TpmUnsealResponse

Source§

const SIZE: usize = 4_098usize

Source§

impl TpmSized for TpmVendorTcgTestCommand

Source§

const SIZE: usize = 258usize

Source§

impl TpmSized for TpmVendorTcgTestResponse

Source§

const SIZE: usize = 258usize

Source§

impl TpmSized for TpmPersistent

Source§

const SIZE: usize = 4usize

Source§

impl TpmSized for TpmSession

Source§

const SIZE: usize = 4usize

Source§

impl TpmSized for TpmTransient

Source§

const SIZE: usize = 4usize

Source§

impl<T: TpmSized + Copy + Default, const CAPACITY: usize> TpmSized for TpmList<T, CAPACITY>

Source§

impl<const CAPACITY: usize> TpmSized for TpmBuffer<CAPACITY>