Skip to main content

BlockingSocketFactory

Trait BlockingSocketFactory 

Source
pub trait BlockingSocketFactory: BlockingSocket + Sized {
    // Required method
    fn new() -> Result<Self, SocketError>;
}
Expand description

Factory for unbound sockets used by crate::HttpClient.

Outside BlockingSocket: methods returning Self break object safety.

Required Methods§

Source

fn new() -> Result<Self, SocketError>

Create an unbound socket.

§Errors

SocketError::OsError if the OS cannot create the socket.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§