Skip to main content

Module bio

Module bio 

Source
Expand description

BIO wrappers — MemBio, MemBioBuf<'a>, Bio.

BIOs are OpenSSL’s generic I/O abstraction. This module exposes three types:

  • MemBio — a writable, growable in-memory BIO (BIO_s_mem()). Used for encoding output (PEM, DER). Call data() after writing to read the result as a &[u8] slice without copying.

  • MemBioBuf<'a> — a read-only view of a caller-supplied slice (BIO_new_mem_buf()). Zero-copy input path for PEM parsing.

  • Bio — shared ownership wrapper around a raw BIO*. Used when OpenSSL needs a BIO that outlives the immediate call (e.g. TLS SSL_set_bio).

Structs§

Bio
Shared ownership wrapper around a BIO*.
MemBio
A writable, growable in-memory BIO.
MemBioBuf
A read-only BIO wrapping a borrowed byte slice (BIO_new_mem_buf()).