rust-lang-nursery / unix-socket

Unix socket support for Rust
Apache License 2.0
54 stars 18 forks source link

Should unix SocketAddr implement Display just like usual SocketAddr? #28

Open vi opened 7 years ago

vi commented 7 years ago

"the trait std::fmt::Display is not implemented for unix_socket::SocketAddr"

Built-in unix SocketAddr also seems to lack Display.

sfackler commented 7 years ago

How would it format the address? Display is normally only implemented for things where there's an obvious, canonical format.

vi commented 7 years ago

Just the path if non-abstract, @+address (if UTF-8-friendly) if abstract.

sfackler commented 7 years ago

What about anonymous addresses?

vi commented 7 years ago

Not sure. Maybe that's why there is no Display...