struct Tls13Owned {
conn: Option<Box<TlsConnection<'static, &'static mut TcpIoWrapper, Aes128GcmSha256>>>,
stream: *mut TcpIoWrapper,
read_buf: *mut [u8],
write_buf: *mut [u8],
}Expand description
TLS 1.3 の接続と、それが借りている記録用のバッファをまとめて持つ。
embedded_tls::TlsConnection はバッファを &'a mut [u8] で借りる。関数をまたいで接続を持ち続けるには
バッファも一緒に動かす必要があるので、ヒープに置いた箱を生ポインタで持ち、接続には 'static の参照として貸す。
Fields§
§conn: Option<Box<TlsConnection<'static, &'static mut TcpIoWrapper, Aes128GcmSha256>>>Drop で先に落とすために Option(それ以外のときは常に Some)。
接続の本体は 1KB を超えるので箱に入れる(置き場の中で動かすのを軽くする)。
stream: *mut TcpIoWrapper§read_buf: *mut [u8]§write_buf: *mut [u8]Implementations§
Source§impl Tls13Owned
impl Tls13Owned
fn new(stream: TcpIoWrapper) -> Self
Trait Implementations§
Source§impl Drop for Tls13Owned
impl Drop for Tls13Owned
impl Send for Tls13Owned
Auto Trait Implementations§
impl !Sync for Tls13Owned
impl !UnwindSafe for Tls13Owned
impl Freeze for Tls13Owned
impl RefUnwindSafe for Tls13Owned
impl Unpin for Tls13Owned
impl UnsafeUnpin for Tls13Owned
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