pub trait FromSocketlike: FromFd {
    fn from_socketlike(owned: OwnedSocketlike) -> Self;
fn from_into_socketlike<Owned: IntoSocketlike>(owned: Owned) -> Self; }
Expand description

A portable trait to express the ability to construct an object from a socketlike object.

This is a portability abstraction over Unix-like FromFd and Windows’ FromSocket. It also provides the from_into_socketlike convenience function providing simplified from+into conversions.

Required methods

Constructs a new instance of Self from the given socketlike object.

Constructs a new instance of Self from the given socketlike object converted from into_owned.

Implementors