Trait rustls::internal::msgs::codec::Codec[][src]

pub trait Codec: Debug + Sized {
    fn encode(&self, bytes: &mut Vec<u8>);
fn read(_: &mut Reader<'_>) -> Option<Self>; fn get_encoding(&self) -> Vec<u8> { ... }
fn read_bytes(bytes: &[u8]) -> Option<Self> { ... } }

Things we can encode and read from a Reader.

Required methods

fn encode(&self, bytes: &mut Vec<u8>)[src]

Encode yourself by appending onto bytes.

fn read(_: &mut Reader<'_>) -> Option<Self>[src]

Decode yourself by fiddling with the Reader. Return Some if it worked, None if not.

Loading content...

Provided methods

fn get_encoding(&self) -> Vec<u8>[src]

Convenience function to get the results of encode().

fn read_bytes(bytes: &[u8]) -> Option<Self>[src]

Read one of these from the front of bytes and return it.

Loading content...

Implementations on Foreign Types

impl Codec for u8[src]

impl Codec for u16[src]

impl Codec for u32[src]

impl Codec for u64[src]

Loading content...

Implementors

impl Codec for AlertDescription[src]

impl Codec for AlertLevel[src]

impl Codec for CertificateStatusType[src]

impl Codec for CipherSuite[src]

impl Codec for ClientCertificateType[src]

impl Codec for Compression[src]

impl Codec for ContentType[src]

impl Codec for ECCurveType[src]

impl Codec for ECPointFormat[src]

impl Codec for ExtensionType[src]

impl Codec for HandshakeType[src]

impl Codec for HashAlgorithm[src]

impl Codec for HeartbeatMessageType[src]

impl Codec for HeartbeatMode[src]

impl Codec for KeyUpdateRequest[src]

impl Codec for NamedCurve[src]

impl Codec for NamedGroup[src]

impl Codec for PSKKeyExchangeMode[src]

impl Codec for ProtocolVersion[src]

impl Codec for ServerNameType[src]

impl Codec for SignatureAlgorithm[src]

impl Codec for SignatureScheme[src]

impl Codec for CertReqExtension[src]

impl Codec for CertificateExtension[src]

impl Codec for CertificateStatusRequest[src]

impl Codec for ClientExtension[src]

impl Codec for HelloRetryExtension[src]

impl Codec for NewSessionTicketExtension[src]

impl Codec for ServerExtension[src]

impl Codec for ServerKeyExchangePayload[src]

impl Codec for AlertMessagePayload[src]

impl Codec for Payload[src]

impl Codec for PayloadU8[src]

impl Codec for PayloadU16[src]

impl Codec for PayloadU24[src]

impl Codec for ChangeCipherSpecPayload[src]

impl Codec for u24[src]

impl Codec for CertificateEntry[src]

impl Codec for CertificatePayloadTLS13[src]

impl Codec for CertificateRequestPayload[src]

impl Codec for CertificateRequestPayloadTLS13[src]

impl Codec for CertificateStatus[src]

impl Codec for ClientECDHParams[src]

impl Codec for ClientHelloPayload[src]

impl Codec for DigitallySignedStruct[src]

impl Codec for ECDHEServerKeyExchange[src]

impl Codec for ECParameters[src]

impl Codec for HandshakeMessagePayload[src]

impl Codec for HelloRetryRequest[src]

impl Codec for KeyShareEntry[src]

impl Codec for NewSessionTicketPayload[src]

impl Codec for NewSessionTicketPayloadTLS13[src]

impl Codec for OCSPCertificateStatusRequest[src]

impl Codec for PresharedKeyIdentity[src]

impl Codec for PresharedKeyOffer[src]

impl Codec for Random[src]

impl Codec for ServerECDHParams[src]

impl Codec for ServerHelloPayload[src]

impl Codec for ServerName[src]

impl Codec for SessionID[src]

impl Codec for Message[src]

impl Codec for ClientSessionKey[src]

impl Codec for ClientSessionValue[src]

impl Codec for ServerSessionValue[src]

impl Codec for Certificate[src]

impl Codec for CertReqExtensions[src]

impl Codec for CertificateExtensions[src]

impl Codec for CertificatePayload[src]

impl Codec for ClientCertificateTypes[src]

impl Codec for ECPointFormatList[src]

impl Codec for EncryptedExtensions[src]

impl Codec for KeyShareEntries[src]

impl Codec for NamedGroups[src]

impl Codec for NewSessionTicketExtensions[src]

impl Codec for PSKKeyExchangeModes[src]

impl Codec for PresharedKeyIdentities[src]

impl Codec for ProtocolVersions[src]

impl Codec for ServerNameRequest[src]

impl Codec for SupportedSignatureSchemes[src]

impl Codec for VecU16OfPayloadU8[src]

impl Codec for VecU16OfPayloadU16[src]

Loading content...