pub struct Bio { /* private fields */ }Expand description
Shared ownership wrapper around a BIO*.
Used where OpenSSL takes ownership of a BIO (e.g. SSL_set_bio) or where
the same BIO must be reachable from multiple Rust values. Implemented with
BIO_up_ref / BIO_free.
Implementations§
Source§impl Bio
impl Bio
Sourcepub fn new_pair() -> Result<(Self, Self), ErrorStack>
pub fn new_pair() -> Result<(Self, Self), ErrorStack>
Create a linked in-memory BIO pair suitable for in-process TLS.
Returns (bio1, bio2) where data written to bio1 is readable from
bio2 and vice-versa. Pass each half to crate::ssl::Ssl::set_bio_duplex on
the client and server Ssl objects respectively.
§Errors
Returns Err if OpenSSL fails to allocate the pair.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Bio
impl RefUnwindSafe for Bio
impl Unpin for Bio
impl UnsafeUnpin for Bio
impl UnwindSafe for Bio
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