newer-type-std 0.3.0

Support defining newtype wrapper with inheriting trait implementations
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use crate::emit_traits;
use newer_type::target;

emit_traits! {
    #[implement_of(newer_type_std::net::ToSocketAddrs)]
    #[slot(String)]
    #[target(alternative = ::std::net::ToSocketAddrs)]
    pub trait ToSocketAddrs {
        type Iter: ::core::iter::Iterator<Item = ::std::net::SocketAddr>;
        fn to_socket_addrs(&self) -> ::std::io::Result<Self::Iter>;
    }
}