Skip to main content

QuicMethod

Trait QuicMethod 

pub trait QuicMethod:
    Send
    + Sync
    + 'static {
    // Required methods
    fn set_read_secret(
        &self,
        level: EncryptionLevel,
        cipher: &SslCipherRef,
        secret: &[u8],
    ) -> Result<(), ErrorStack>;
    fn set_write_secret(
        &self,
        level: EncryptionLevel,
        cipher: &SslCipherRef,
        secret: &[u8],
    ) -> Result<(), ErrorStack>;
    fn add_handshake_data(
        &self,
        level: EncryptionLevel,
        data: &[u8],
    ) -> Result<(), ErrorStack>;
    fn flush_flight(&self) -> Result<(), ErrorStack>;
    fn send_alert(
        &self,
        level: EncryptionLevel,
        alert: u8,
    ) -> Result<(), ErrorStack>;
}
Available on crate feature boring only.
Expand description

Callbacks run synchronously inside a handshake operation. Borrowed bytes must be copied before retaining them; retained secrets must be protected by the caller. No callback receives the SSL object, preventing recursive handshake operations.

Required Methods§

fn set_read_secret( &self, level: EncryptionLevel, cipher: &SslCipherRef, secret: &[u8], ) -> Result<(), ErrorStack>

fn set_write_secret( &self, level: EncryptionLevel, cipher: &SslCipherRef, secret: &[u8], ) -> Result<(), ErrorStack>

fn add_handshake_data( &self, level: EncryptionLevel, data: &[u8], ) -> Result<(), ErrorStack>

fn flush_flight(&self) -> Result<(), ErrorStack>

fn send_alert( &self, level: EncryptionLevel, alert: u8, ) -> Result<(), ErrorStack>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§