fix(rustup): str.split and associated type changes

This commit is contained in:
Robin Gloster
2015-02-26 19:06:15 +01:00
parent 9998417fe8
commit 1b6e6a040f
4 changed files with 6 additions and 3 deletions

View File

@@ -33,6 +33,7 @@ pub struct Streaming;
/// An abstraction to listen for connections on a certain port.
pub trait NetworkListener {
/// Type of Acceptor
type Acceptor: NetworkAcceptor;
/// Listens on a socket.
fn listen<To: ToSocketAddr>(&mut self, addr: To) -> IoResult<Self::Acceptor>;
@@ -40,6 +41,7 @@ pub trait NetworkListener {
/// An abstraction to receive `NetworkStream`s.
pub trait NetworkAcceptor: Clone + Send {
/// Type of Stream to receive
type Stream: NetworkStream + Send + Clone;
/// Returns an iterator of streams.
@@ -89,6 +91,7 @@ impl<T: NetworkStream + Send + Clone> StreamClone for T {
/// A connector creates a NetworkStream.
pub trait NetworkConnector {
/// Type of Stream to create
type Stream: NetworkStream + Send;
/// Connect to a remote address.
fn connect(&mut self, host: &str, port: Port, scheme: &str) -> IoResult<Self::Stream>;