Size

Trait Size 

pub trait Size {
    // Required method
    fn tls_serialized_len(&self) -> usize;
}
Available on 32-bit or 64-bit only.
Expand description

The Size trait needs to be implemented by any struct that should be efficiently serialized. This allows to collect the length of a serialized structure before allocating memory.

Required Methods§

Implementations on Foreign Types§

§

impl Size for &u8

§

impl Size for &u16

§

impl Size for &u32

§

impl Size for &u64

§

impl Size for &HpkePublicKey

Available on crate feature serialization only.
§

impl Size for &HpkePublicKey

Available on crate feature serialization only.
§

impl Size for &SignatureKeyPair

§

impl Size for u8

§

impl Size for u16

§

impl Size for u32

§

impl Size for u64

§

impl Size for ()

§

impl Size for HpkePublicKey

Available on crate feature serialization only.
§

impl Size for HpkePublicKey

Available on crate feature serialization only.
§

impl Size for SignatureKeyPair

§

impl<T> Size for &Option<T>
where T: Size,

§

impl<T> Size for &[T]
where T: Size,

§

impl<T> Size for &Vec<T>
where T: Size,

§

impl<T> Size for Option<T>
where T: Size,

§

impl<T> Size for Box<T>
where T: Size,

§

impl<T> Size for Vec<T>
where T: Size,

§

impl<T> Size for PhantomData<T>

§

impl<T, U> Size for (T, U)
where T: Size, U: Size,

§

impl<T, U, V> Size for (T, U, V)
where T: Size, U: Size, V: Size,

§

impl<const LEN: usize> Size for [u8; LEN]

Implementors§

Source§

impl Size for &Extension

Source§

impl Size for &ContentType

Source§

impl Size for &MlsMessageBodyIn

Source§

impl Size for &MlsMessageBodyOut

Source§

impl Size for &Sender

Source§

impl Size for &WireFormat

Source§

impl Size for &ProposalOrRefType

Source§

impl Size for &ProposalIn

Source§

impl Size for &Psk

Source§

impl Size for &ResumptionPskUsage

§

impl Size for &Ciphersuite

Source§

impl Size for &FrankenContentType

Available on crate features test-utils only.
Source§

impl Size for &FrankenFramedContentBody

Available on crate features test-utils only.
Source§

impl Size for &FrankenLeafNodeSource

Available on crate features test-utils only.
Source§

impl Size for &FrankenMlsMessageBody

Available on crate features test-utils only.
Source§

impl Size for &FrankenNode

Available on crate features test-utils only.
Source§

impl Size for &FrankenProposalOrRef

Available on crate features test-utils only.
Source§

impl Size for &FrankenPsk

Available on crate features test-utils only.
Source§

impl Size for &FrankenResumptionPskUsage

Available on crate features test-utils only.
Source§

impl Size for &FrankenSender

Available on crate features test-utils only.
Source§

impl Size for &LeafNodeSource

Source§

impl Size for &Node

§

impl Size for &SignatureScheme

Source§

impl Size for &HashReference

Source§

impl Size for &SignContent

Source§

impl Size for &Signature

Source§

impl Size for &SignaturePublicKey

§

impl Size for &HpkePrivateKey

Source§

impl Size for &Credential

Source§

impl Size for &ApplicationIdExtension

Source§

impl Size for &Extensions

Source§

impl Size for &ExternalPubExtension

Source§

impl Size for &ExternalSender

Source§

impl Size for &LastResortExtension

Source§

impl Size for &RatchetTreeExtension

Source§

impl Size for &RequiredCapabilitiesExtension

Source§

impl Size for &SenderExtensionIndex

Source§

impl Size for &MlsMessageIn

Source§

impl Size for &MlsMessageOut

Source§

impl Size for &PrivateMessage

Source§

impl Size for &PrivateMessageIn

Source§

impl Size for &GroupContext

Source§

impl Size for &GroupEpoch

Source§

impl Size for &GroupId

Source§

impl Size for &KeyPackageIn

Source§

impl Size for &InitKey

Source§

impl Size for &KeyPackage

Source§

impl Size for &Lifetime

Source§

impl Size for &GroupInfo

Source§

impl Size for &VerifiableGroupInfo

Source§

impl Size for &AddProposal

Source§

impl Size for &AppAck

Source§

impl Size for &AppEphemeralProposal

Source§

impl Size for &CustomProposal

Source§

impl Size for &ExternalInitProposal

Source§

impl Size for &GroupContextExtensionProposal

Source§

impl Size for &PreSharedKeyProposal

Source§

impl Size for &ReInitProposal

Source§

impl Size for &RemoveProposal

Source§

impl Size for &UpdateProposal

Source§

impl Size for &AddProposalIn

Source§

impl Size for &UpdateProposalIn

Source§

impl Size for &ConfirmationTag

Source§

impl Size for &EncryptedGroupSecrets

Source§

impl Size for &Welcome

Source§

impl Size for &ExternalPsk

Source§

impl Size for &PreSharedKeyId

Source§

impl Size for &ResumptionPsk

Source§

impl Size for &FrankenAddProposal

Available on crate features test-utils only.
Source§

impl Size for &FrankenAppEphemeralProposal

Available on crate features test-utils only.
Source§

impl Size for &FrankenApplicationIdExtension

Available on crate features test-utils only.
Source§

impl Size for &FrankenCapabilities

Available on crate features test-utils only.
Source§

impl Size for &FrankenCommit

Available on crate features test-utils only.
Source§

impl Size for &FrankenCredential

Available on crate features test-utils only.
Source§

impl Size for &FrankenCustomProposal

Available on crate features test-utils only.
Source§

impl Size for &FrankenEncryptedGroupSecrets

Available on crate features test-utils only.
Source§

impl Size for &FrankenExternalInitProposal

Available on crate features test-utils only.
Source§

impl Size for &FrankenExternalPsk

Available on crate features test-utils only.
Source§

impl Size for &FrankenExternalPubExtension

Available on crate features test-utils only.
Source§

impl Size for &FrankenExternalSender

Available on crate features test-utils only.
Source§

impl Size for &FrankenExternalSendersExtension

Available on crate features test-utils only.
Source§

impl Size for &FrankenFramedContent

Available on crate features test-utils only.
Source§

impl Size for &FrankenHpkeCiphertext

Available on crate features test-utils only.
Source§

impl Size for &FrankenKeyPackage

Available on crate features test-utils only.
Source§

impl Size for &FrankenKeyPackageTbs

Available on crate features test-utils only.
Source§

impl Size for &FrankenLeafNode

Available on crate features test-utils only.
Source§

impl Size for &FrankenLeafNodePayload

Available on crate features test-utils only.
Source§

impl Size for &FrankenLeafNodeTbs

Available on crate features test-utils only.
Source§

impl Size for &FrankenLifetime

Available on crate features test-utils only.
Source§

impl Size for &FrankenMessageRange

Available on crate features test-utils only.
Source§

impl Size for &FrankenMlsMessage

Available on crate features test-utils only.
Source§

impl Size for &FrankenParentNode

Available on crate features test-utils only.
Source§

impl Size for &FrankenPreSharedKeyId

Available on crate features test-utils only.
Source§

impl Size for &FrankenPreSharedKeyProposal

Available on crate features test-utils only.
Source§

impl Size for &FrankenPrivateMessage

Available on crate features test-utils only.
Source§

impl Size for &FrankenRatchetTreeExtension

Available on crate features test-utils only.
Source§

impl Size for &FrankenReInitProposal

Available on crate features test-utils only.
Source§

impl Size for &FrankenRemoveProposal

Available on crate features test-utils only.
Source§

impl Size for &FrankenRequiredCapabilitiesExtension

Available on crate features test-utils only.
Source§

impl Size for &FrankenResumptionPsk

Available on crate features test-utils only.
Source§

impl Size for &FrankenTreePosition

Available on crate features test-utils only.
Source§

impl Size for &FrankenUpdatePathIn

Available on crate features test-utils only.
Source§

impl Size for &FrankenUpdatePathNode

Available on crate features test-utils only.
Source§

impl Size for &FrankenUpdateProposal

Available on crate features test-utils only.
Source§

impl Size for &FrankenWelcome

Available on crate features test-utils only.
Source§

impl Size for &EncryptionKey

Source§

impl Size for &LeafNode

Source§

impl Size for &ParentNode

Source§

impl Size for &RatchetTree

Source§

impl Size for &RatchetTreeIn

Source§

impl Size for &Capabilities

§

impl Size for &HpkeCiphertext

Source§

impl Size for &LeafNodeIndex

§

impl Size for &TlsByteVecU8

§

impl Size for &TlsByteVecU16

§

impl Size for &TlsByteVecU24

§

impl Size for &TlsByteVecU32

§

impl Size for &U24

§

impl Size for &VLByteSlice<'_>

§

impl Size for &VLBytes

§

impl Size for &VerifiableCiphersuite

Source§

impl Size for CredentialType

Source§

impl Size for Extension

Source§

impl Size for ExtensionType

Source§

impl Size for ContentType

Source§

impl Size for MlsMessageBodyIn

Source§

impl Size for MlsMessageBodyOut

Source§

impl Size for Sender

Source§

impl Size for WireFormat

Source§

impl Size for Proposal

Source§

impl Size for ProposalOrRefType

Source§

impl Size for ProposalType

Source§

impl Size for ProposalIn

Source§

impl Size for Psk

Source§

impl Size for ResumptionPskUsage

§

impl Size for Ciphersuite

Source§

impl Size for FrankenContentType

Available on crate features test-utils only.
Source§

impl Size for FrankenExtension

Available on crate features test-utils only.
Source§

impl Size for FrankenExtensionType

Available on crate features test-utils only.
Source§

impl Size for FrankenFramedContentBody

Available on crate features test-utils only.
Source§

impl Size for FrankenLeafNodeSource

Available on crate features test-utils only.
Source§

impl Size for FrankenMlsMessageBody

Available on crate features test-utils only.
Source§

impl Size for FrankenNode

Available on crate features test-utils only.
Source§

impl Size for FrankenProposal

Available on crate features test-utils only.
Source§

impl Size for FrankenProposalOrRef

Available on crate features test-utils only.
Source§

impl Size for FrankenProposalType

Available on crate features test-utils only.
Source§

impl Size for FrankenPsk

Available on crate features test-utils only.
Source§

impl Size for FrankenResumptionPskUsage

Available on crate features test-utils only.
Source§

impl Size for FrankenSender

Available on crate features test-utils only.
Source§

impl Size for LeafNodeSource

Source§

impl Size for Node

Source§

impl Size for ProtocolVersion

§

impl Size for SignatureScheme

Source§

impl Size for HashReference

Source§

impl Size for SignContent

Source§

impl Size for Signature

Source§

impl Size for SignaturePublicKey

§

impl Size for HpkePrivateKey

Source§

impl Size for Credential

Source§

impl Size for ApplicationIdExtension

Source§

impl Size for Extensions

Source§

impl Size for ExternalPubExtension

Source§

impl Size for ExternalSender

Source§

impl Size for LastResortExtension

Source§

impl Size for RatchetTreeExtension

Source§

impl Size for RequiredCapabilitiesExtension

Source§

impl Size for SenderExtensionIndex

Source§

impl Size for MlsMessageIn

Source§

impl Size for MlsMessageOut

Source§

impl Size for PrivateMessage

Source§

impl Size for PrivateMessageIn

Source§

impl Size for PublicMessage

Source§

impl Size for PublicMessageIn

Source§

impl Size for GroupContext

Source§

impl Size for GroupEpoch

Source§

impl Size for GroupId

Source§

impl Size for KeyPackageIn

Source§

impl Size for InitKey

Source§

impl Size for KeyPackage

Source§

impl Size for Lifetime

Source§

impl Size for GroupInfo

Source§

impl Size for VerifiableGroupInfo

Source§

impl Size for AddProposal

Source§

impl Size for AppAck

Source§

impl Size for AppEphemeralProposal

Source§

impl Size for CustomProposal

Source§

impl Size for ExternalInitProposal

Source§

impl Size for GroupContextExtensionProposal

Source§

impl Size for PreSharedKeyProposal

Source§

impl Size for ReInitProposal

Source§

impl Size for RemoveProposal

Source§

impl Size for UpdateProposal

Source§

impl Size for AddProposalIn

Source§

impl Size for UpdateProposalIn

Source§

impl Size for ConfirmationTag

Source§

impl Size for EncryptedGroupSecrets

Source§

impl Size for Welcome

Source§

impl Size for ExternalPsk

Source§

impl Size for PreSharedKeyId

Source§

impl Size for ResumptionPsk

Source§

impl Size for FrankenAddProposal

Available on crate features test-utils only.
Source§

impl Size for FrankenAppEphemeralProposal

Available on crate features test-utils only.
Source§

impl Size for FrankenApplicationIdExtension

Available on crate features test-utils only.
Source§

impl Size for FrankenCapabilities

Available on crate features test-utils only.
Source§

impl Size for FrankenCommit

Available on crate features test-utils only.
Source§

impl Size for FrankenCredential

Available on crate features test-utils only.
Source§

impl Size for FrankenCustomProposal

Available on crate features test-utils only.
Source§

impl Size for FrankenEncryptedGroupSecrets

Available on crate features test-utils only.
Source§

impl Size for FrankenExternalInitProposal

Available on crate features test-utils only.
Source§

impl Size for FrankenExternalPsk

Available on crate features test-utils only.
Source§

impl Size for FrankenExternalPubExtension

Available on crate features test-utils only.
Source§

impl Size for FrankenExternalSender

Available on crate features test-utils only.
Source§

impl Size for FrankenExternalSendersExtension

Available on crate features test-utils only.
Source§

impl Size for FrankenFramedContent

Available on crate features test-utils only.
Source§

impl Size for FrankenFramedContentAuthData

Available on crate features test-utils only.
Source§

impl Size for FrankenFramedContentTbs<'_>

Available on crate features test-utils only.
Source§

impl Size for FrankenHpkeCiphertext

Available on crate features test-utils only.
Source§

impl Size for FrankenKeyPackage

Available on crate features test-utils only.
Source§

impl Size for FrankenKeyPackageTbs

Available on crate features test-utils only.
Source§

impl Size for FrankenLeafNode

Available on crate features test-utils only.
Source§

impl Size for FrankenLeafNodePayload

Available on crate features test-utils only.
Source§

impl Size for FrankenLeafNodeTbs

Available on crate features test-utils only.
Source§

impl Size for FrankenLifetime

Available on crate features test-utils only.
Source§

impl Size for FrankenMessageRange

Available on crate features test-utils only.
Source§

impl Size for FrankenMlsMessage

Available on crate features test-utils only.
Source§

impl Size for FrankenParentNode

Available on crate features test-utils only.
Source§

impl Size for FrankenPreSharedKeyId

Available on crate features test-utils only.
Source§

impl Size for FrankenPreSharedKeyProposal

Available on crate features test-utils only.
Source§

impl Size for FrankenPrivateMessage

Available on crate features test-utils only.
Source§

impl Size for FrankenPublicMessage

Available on crate features test-utils only.
Source§

impl Size for FrankenRatchetTreeExtension

Available on crate features test-utils only.
Source§

impl Size for FrankenReInitProposal

Available on crate features test-utils only.
Source§

impl Size for FrankenRemoveProposal

Available on crate features test-utils only.
Source§

impl Size for FrankenRequiredCapabilitiesExtension

Available on crate features test-utils only.
Source§

impl Size for FrankenResumptionPsk

Available on crate features test-utils only.
Source§

impl Size for FrankenTreePosition

Available on crate features test-utils only.
Source§

impl Size for FrankenUpdatePathIn

Available on crate features test-utils only.
Source§

impl Size for FrankenUpdatePathNode

Available on crate features test-utils only.
Source§

impl Size for FrankenUpdateProposal

Available on crate features test-utils only.
Source§

impl Size for FrankenWelcome

Available on crate features test-utils only.
Source§

impl Size for EncryptionKey

Source§

impl Size for LeafNode

Source§

impl Size for ParentNode

Source§

impl Size for RatchetTree

Source§

impl Size for RatchetTreeIn

Source§

impl Size for Capabilities

§

impl Size for HpkeCiphertext

Source§

impl Size for LeafNodeIndex

§

impl Size for SecretVLBytes

§

impl Size for TlsByteVecU8

§

impl Size for TlsByteVecU16

§

impl Size for TlsByteVecU24

§

impl Size for TlsByteVecU32

§

impl Size for U24

§

impl Size for VLByteSlice<'_>

§

impl Size for VLBytes

§

impl Size for VerifiableCiphersuite

Source§

impl<'a> Size for &FrankenAuthenticatedContentTbm<'a>

Available on crate features test-utils only.
Source§

impl<'a> Size for &FrankenSignContent<'a>

Available on crate features test-utils only.
§

impl<'a> Size for &TlsByteSliceU8<'a>

§

impl<'a> Size for &TlsByteSliceU16<'a>

§

impl<'a> Size for &TlsByteSliceU24<'a>

§

impl<'a> Size for &TlsByteSliceU32<'a>

Source§

impl<'a> Size for FrankenAuthenticatedContentTbm<'a>

Available on crate features test-utils only.
Source§

impl<'a> Size for FrankenSignContent<'a>

Available on crate features test-utils only.
§

impl<'a> Size for TlsByteSliceU8<'a>

§

impl<'a> Size for TlsByteSliceU16<'a>

§

impl<'a> Size for TlsByteSliceU24<'a>

§

impl<'a> Size for TlsByteSliceU32<'a>

§

impl<'a, T> Size for &TlsSliceU8<'a, T>
where T: Size,

§

impl<'a, T> Size for &TlsSliceU16<'a, T>
where T: Size,

§

impl<'a, T> Size for &TlsSliceU24<'a, T>
where T: Size,

§

impl<'a, T> Size for &TlsSliceU32<'a, T>
where T: Size,

§

impl<'a, T> Size for TlsSliceU8<'a, T>
where T: Size,

§

impl<'a, T> Size for TlsSliceU16<'a, T>
where T: Size,

§

impl<'a, T> Size for TlsSliceU24<'a, T>
where T: Size,

§

impl<'a, T> Size for TlsSliceU32<'a, T>
where T: Size,

§

impl<T> Size for &SecretTlsVecU8<T>
where T: Zeroize + Size,

§

impl<T> Size for &SecretTlsVecU16<T>
where T: Zeroize + Size,

§

impl<T> Size for &SecretTlsVecU24<T>
where T: Zeroize + Size,

§

impl<T> Size for &SecretTlsVecU32<T>
where T: Zeroize + Size,

§

impl<T> Size for &TlsVecU8<T>
where T: Size,

§

impl<T> Size for &TlsVecU16<T>
where T: Size,

§

impl<T> Size for &TlsVecU24<T>
where T: Size,

§

impl<T> Size for &TlsVecU32<T>
where T: Size,

§

impl<T> Size for SecretTlsVecU8<T>
where T: Zeroize + Size,

§

impl<T> Size for SecretTlsVecU16<T>
where T: Zeroize + Size,

§

impl<T> Size for SecretTlsVecU24<T>
where T: Zeroize + Size,

§

impl<T> Size for SecretTlsVecU32<T>
where T: Zeroize + Size,

§

impl<T> Size for TlsVecU8<T>
where T: Size,

§

impl<T> Size for TlsVecU16<T>
where T: Size,

§

impl<T> Size for TlsVecU24<T>
where T: Size,

§

impl<T> Size for TlsVecU32<T>
where T: Size,