IdleWatcher::onetime(&mut self.uvio.loop_, f);
}
- fn pausable_idle_callback(&mut self, cb: Box<rtio::Callback:Send>)
- -> Box<rtio::PausableIdleCallback:Send> {
+ fn pausable_idle_callback(&mut self, cb: Box<rtio::Callback + Send>)
+ -> Box<rtio::PausableIdleCallback + Send> {
IdleWatcher::new(&mut self.uvio.loop_, cb)
- as Box<rtio::PausableIdleCallback:Send>
+ as Box<rtio::PausableIdleCallback + Send>
}
- fn remote_callback(&mut self, f: Box<rtio::Callback:Send>)
- -> Box<rtio::RemoteCallback:Send> {
+ fn remote_callback(&mut self, f: Box<rtio::Callback + Send>)
+ -> Box<rtio::RemoteCallback + Send> {
box AsyncWatcher::new(&mut self.uvio.loop_, f) as
- Box<rtio::RemoteCallback:Send>
+ Box<rtio::RemoteCallback + Send>
}
fn io<'a>(&'a mut self) -> Option<&'a mut rtio::IoFactory> {
// NB: This blocks the task waiting on the connection.
// It would probably be better to return a future
fn tcp_connect(&mut self, addr: rtio::SocketAddr, timeout: Option<u64>)
- -> IoResult<Box<rtio::RtioTcpStream:Send>> {
+ -> IoResult<Box<rtio::RtioTcpStream + Send>> {
match TcpWatcher::connect(self, addr, timeout) {
- Ok(t) => Ok(box t as Box<rtio::RtioTcpStream:Send>),
+ Ok(t) => Ok(box t as Box<rtio::RtioTcpStream + Send>),
Err(e) => Err(uv_error_to_io_error(e)),
}
}
fn tcp_bind(&mut self, addr: rtio::SocketAddr)
- -> IoResult<Box<rtio::RtioTcpListener:Send>> {
+ -> IoResult<Box<rtio::RtioTcpListener + Send>> {
match TcpListener::bind(self, addr) {
- Ok(t) => Ok(t as Box<rtio::RtioTcpListener:Send>),
+ Ok(t) => Ok(t as Box<rtio::RtioTcpListener + Send>),
Err(e) => Err(uv_error_to_io_error(e)),
}
}
fn udp_bind(&mut self, addr: rtio::SocketAddr)
- -> IoResult<Box<rtio::RtioUdpSocket:Send>> {
+ -> IoResult<Box<rtio::RtioUdpSocket + Send>> {
match UdpWatcher::bind(self, addr) {
- Ok(u) => Ok(box u as Box<rtio::RtioUdpSocket:Send>),
+ Ok(u) => Ok(box u as Box<rtio::RtioUdpSocket + Send>),
Err(e) => Err(uv_error_to_io_error(e)),
}
}
- fn timer_init(&mut self) -> IoResult<Box<rtio::RtioTimer:Send>> {
- Ok(TimerWatcher::new(self) as Box<rtio::RtioTimer:Send>)
+ fn timer_init(&mut self) -> IoResult<Box<rtio::RtioTimer + Send>> {
+ Ok(TimerWatcher::new(self) as Box<rtio::RtioTimer + Send>)
}
fn get_host_addresses(&mut self, host: Option<&str>, servname: Option<&str>,
}
fn fs_from_raw_fd(&mut self, fd: c_int, close: rtio::CloseBehavior)
- -> Box<rtio::RtioFileStream:Send> {
+ -> Box<rtio::RtioFileStream + Send> {
box FileWatcher::new(self, fd, close) as
- Box<rtio::RtioFileStream:Send>
+ Box<rtio::RtioFileStream + Send>
}
fn fs_open(&mut self, path: &CString, fm: rtio::FileMode,
fa: rtio::FileAccess)
- -> IoResult<Box<rtio::RtioFileStream:Send>>
+ -> IoResult<Box<rtio::RtioFileStream + Send>>
{
let flags = match fm {
rtio::Open => 0,
};
match FsRequest::open(self, path, flags as int, mode as int) {
- Ok(fs) => Ok(box fs as Box<rtio::RtioFileStream:Send>),
+ Ok(fs) => Ok(box fs as Box<rtio::RtioFileStream + Send>),
Err(e) => Err(uv_error_to_io_error(e))
}
}
}
fn spawn(&mut self, cfg: ProcessConfig)
- -> IoResult<(Box<rtio::RtioProcess:Send>,
- Vec<Option<Box<rtio::RtioPipe:Send>>>)>
+ -> IoResult<(Box<rtio::RtioProcess + Send>,
+ Vec<Option<Box<rtio::RtioPipe + Send>>>)>
{
match Process::spawn(self, cfg) {
Ok((p, io)) => {
- Ok((p as Box<rtio::RtioProcess:Send>,
+ Ok((p as Box<rtio::RtioProcess + Send>,
io.move_iter().map(|i| i.map(|p| {
- box p as Box<rtio::RtioPipe:Send>
+ box p as Box<rtio::RtioPipe + Send>
})).collect()))
}
Err(e) => Err(uv_error_to_io_error(e)),
}
fn unix_bind(&mut self, path: &CString)
- -> IoResult<Box<rtio::RtioUnixListener:Send>> {
+ -> IoResult<Box<rtio::RtioUnixListener + Send>> {
match PipeListener::bind(self, path) {
- Ok(p) => Ok(p as Box<rtio::RtioUnixListener:Send>),
+ Ok(p) => Ok(p as Box<rtio::RtioUnixListener + Send>),
Err(e) => Err(uv_error_to_io_error(e)),
}
}
fn unix_connect(&mut self, path: &CString, timeout: Option<u64>)
- -> IoResult<Box<rtio::RtioPipe:Send>> {
+ -> IoResult<Box<rtio::RtioPipe + Send>> {
match PipeWatcher::connect(self, path, timeout) {
- Ok(p) => Ok(box p as Box<rtio::RtioPipe:Send>),
+ Ok(p) => Ok(box p as Box<rtio::RtioPipe + Send>),
Err(e) => Err(uv_error_to_io_error(e)),
}
}
fn tty_open(&mut self, fd: c_int, readable: bool)
- -> IoResult<Box<rtio::RtioTTY:Send>> {
+ -> IoResult<Box<rtio::RtioTTY + Send>> {
match TtyWatcher::new(self, fd, readable) {
- Ok(tty) => Ok(box tty as Box<rtio::RtioTTY:Send>),
+ Ok(tty) => Ok(box tty as Box<rtio::RtioTTY + Send>),
Err(e) => Err(uv_error_to_io_error(e))
}
}
fn pipe_open(&mut self, fd: c_int)
- -> IoResult<Box<rtio::RtioPipe:Send>>
+ -> IoResult<Box<rtio::RtioPipe + Send>>
{
match PipeWatcher::open(self, fd) {
- Ok(s) => Ok(box s as Box<rtio::RtioPipe:Send>),
+ Ok(s) => Ok(box s as Box<rtio::RtioPipe + Send>),
Err(e) => Err(uv_error_to_io_error(e))
}
}
- fn signal(&mut self, signum: int, cb: Box<rtio::Callback:Send>)
- -> IoResult<Box<rtio::RtioSignal:Send>>
+ fn signal(&mut self, signum: int, cb: Box<rtio::Callback + Send>)
+ -> IoResult<Box<rtio::RtioSignal + Send>>
{
match SignalWatcher::new(self, signum, cb) {
- Ok(s) => Ok(s as Box<rtio::RtioSignal:Send>),
+ Ok(s) => Ok(s as Box<rtio::RtioSignal + Send>),
Err(e) => Err(uv_error_to_io_error(e)),
}
}