Trait SockAddr

Source
pub unsafe trait SockAddr {
    // Required method
    fn family() -> u8;
}
Expand description

A socket address type.

§Safety

This trait should be implemented by types that have the memory layout of a struct sockaddr: they will be allowed to be passed to functions like connect, bind or accept4_with_peer_addr, and they are expected to start with a 16-byte field for the address family.

Required Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§