Add missing Debug impls.

This commit is contained in:
Tim Kuehn
2016-04-24 21:06:42 -07:00
parent fe116a1b6b
commit 44eec09418
3 changed files with 9 additions and 0 deletions

View File

@@ -1,4 +1,6 @@
## 0.5 (2016-04-24)
### Breaking Changes
0.5 adds support for arbitrary transports via the
[`Transport`](tarpc/src/transport/mod.rs#L7) trait.
Out of the box tarpc provides implementations for:
@@ -6,6 +8,9 @@ Out of the box tarpc provides implementations for:
* Tcp, for types `impl`ing `ToSocketAddrs`.
* Unix sockets via the `UnixTransport` type.
This was a breaking change: `handler.local_addr()` was renamed
`handler.dialer()`.
## 0.4 (2016-04-02)
### Breaking Changes

View File

@@ -3,6 +3,7 @@ use std::net::{SocketAddr, TcpListener, TcpStream, ToSocketAddrs};
use std::time::Duration;
/// A transport for TCP.
#[derive(Debug)]
pub struct TcpTransport<A: ToSocketAddrs>(pub A);
impl<A: ToSocketAddrs> super::Transport for TcpTransport<A> {
@@ -54,6 +55,7 @@ impl super::Stream for TcpStream {
}
/// Connects to a socket address.
#[derive(Debug)]
pub struct TcpDialer<A = SocketAddr>(pub A) where A: ToSocketAddrs;
impl<A> super::Dialer for TcpDialer<A>

View File

@@ -4,6 +4,7 @@ use std::time::Duration;
use unix_socket::{UnixListener, UnixStream};
/// A transport for unix sockets.
#[derive(Debug)]
pub struct UnixTransport<P>(pub P) where P: AsRef<Path>;
impl<P> super::Transport for UnixTransport<P>
@@ -17,6 +18,7 @@ impl<P> super::Transport for UnixTransport<P>
}
/// Connects to a unix socket address.
#[derive(Debug)]
pub struct UnixDialer<P>(pub P) where P: AsRef<Path>;
impl<P> super::Dialer for UnixDialer<P>