(index<- ) ./libstd/rt/rtio.rs
git branch: * master 5200215 auto merge of #14035 : alexcrichton/rust/experimental, r=huonw
modified: Fri May 9 13:02:28 2014
1 // Copyright 2013 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 //! The EventLoop and internal synchronous I/O interface.
12
13 use c_str::CString;
14 use cast;
15 use comm::{Sender, Receiver};
16 use libc::c_int;
17 use libc;
18 use kinds::Send;
19 use ops::Drop;
20 use option::{Option, Some, None};
21 use owned::Box;
22 use path::Path;
23 use result::Err;
24 use rt::local::Local;
25 use rt::task::Task;
26 use vec::Vec;
27
28 use ai = io::net::addrinfo;
29 use io;
30 use io::IoResult;
31 use io::net::ip::{IpAddr, SocketAddr};
32 use io::process::{ProcessConfig, ProcessExit};
33 use io::signal::Signum;
34 use io::{FileMode, FileAccess, FileStat, FilePermission};
35 use io::{SeekStyle};
36
37 pub trait Callback {
38 fn call(&mut self);
39 }
40
41 pub trait EventLoop {
42 fn run(&mut self);
43 fn callback(&mut self, arg: proc():Send);
44 fn pausable_idle_callback(&mut self, Box<Callback:Send>)
45 -> Box<PausableIdleCallback:Send>;
46 fn remote_callback(&mut self, Box<Callback:Send>)
47 -> Box<RemoteCallback:Send>;
48
49 /// The asynchronous I/O services. Not all event loops may provide one.
50 fn io<'a>(&'a mut self) -> Option<&'a mut IoFactory>;
51 fn has_active_io(&self) -> bool;
52 }
53
54 pub trait RemoteCallback {
55 /// Trigger the remote callback. Note that the number of times the
56 /// callback is run is not guaranteed. All that is guaranteed is
57 /// that, after calling 'fire', the callback will be called at
58 /// least once, but multiple callbacks may be coalesced and
59 /// callbacks may be called more often requested. Destruction also
60 /// triggers the callback.
61 fn fire(&mut self);
62 }
63
64 /// Data needed to make a successful open(2) call
65 /// Using unix flag conventions for now, which happens to also be what's supported
66 /// libuv (it does translation to windows under the hood).
67 pub struct FileOpenConfig {
68 /// Path to file to be opened
69 pub path: Path,
70 /// Flags for file access mode (as per open(2))
71 pub flags: int,
72 /// File creation mode, ignored unless O_CREAT is passed as part of flags
73 pub mode: int
74 }
75
76 /// Description of what to do when a file handle is closed
77 pub enum CloseBehavior {
78 /// Do not close this handle when the object is destroyed
79 DontClose,
80 /// Synchronously close the handle, meaning that the task will block when
81 /// the handle is destroyed until it has been fully closed.
82 CloseSynchronously,
83 /// Asynchronously closes a handle, meaning that the task will *not* block
84 /// when the handle is destroyed, but the handle will still get deallocated
85 /// and cleaned up (but this will happen asynchronously on the local event
86 /// loop).
87 CloseAsynchronously,
88 }
89
90 pub struct LocalIo<'a> {
91 factory: &'a mut IoFactory,
92 }
93
94 #[unsafe_destructor]
95 impl<'a> Drop for LocalIo<'a> {
96 fn drop(&mut self) {
97 // FIXME(pcwalton): Do nothing here for now, but eventually we may want
98 // something. For now this serves to make `LocalIo` noncopyable.
99 }
100 }
101
102 impl<'a> LocalIo<'a> {
103 /// Returns the local I/O: either the local scheduler's I/O services or
104 /// the native I/O services.
105 pub fn borrow() -> Option<LocalIo> {
106 // FIXME(#11053): bad
107 //
108 // This is currently very unsafely implemented. We don't actually
109 // *take* the local I/O so there's a very real possibility that we
110 // can have two borrows at once. Currently there is not a clear way
111 // to actually borrow the local I/O factory safely because even if
112 // ownership were transferred down to the functions that the I/O
113 // factory implements it's just too much of a pain to know when to
114 // relinquish ownership back into the local task (but that would be
115 // the safe way of implementing this function).
116 //
117 // In order to get around this, we just transmute a copy out of the task
118 // in order to have what is likely a static lifetime (bad).
119 let mut t: Box<Task> = Local::take();
120 let ret = t.local_io().map(|t| {
121 unsafe { cast::transmute_copy(&t) }
122 });
123 Local::put(t);
124 return ret;
125 }
126
127 pub fn maybe_raise<T>(f: |io: &mut IoFactory| -> IoResult<T>)
128 -> IoResult<T>
129 {
130 match LocalIo::borrow() {
131 None => Err(io::standard_error(io::IoUnavailable)),
132 Some(mut io) => f(io.get()),
133 }
134 }
135
136 pub fn new<'a>(io: &'a mut IoFactory) -> LocalIo<'a> {
137 LocalIo { factory: io }
138 }
139
140 /// Returns the underlying I/O factory as a trait reference.
141 #[inline]
142 pub fn get<'a>(&'a mut self) -> &'a mut IoFactory {
143 // FIXME(pcwalton): I think this is actually sound? Could borrow check
144 // allow this safely?
145 unsafe {
146 cast::transmute_copy(&self.factory)
147 }
148 }
149 }
150
151 pub trait IoFactory {
152 // networking
153 fn tcp_connect(&mut self, addr: SocketAddr,
154 timeout: Option<u64>) -> IoResult<Box<RtioTcpStream:Send>>;
155 fn tcp_bind(&mut self, addr: SocketAddr)
156 -> IoResult<Box<RtioTcpListener:Send>>;
157 fn udp_bind(&mut self, addr: SocketAddr)
158 -> IoResult<Box<RtioUdpSocket:Send>>;
159 fn unix_bind(&mut self, path: &CString)
160 -> IoResult<Box<RtioUnixListener:Send>>;
161 fn unix_connect(&mut self, path: &CString,
162 timeout: Option<u64>) -> IoResult<Box<RtioPipe:Send>>;
163 fn get_host_addresses(&mut self, host: Option<&str>, servname: Option<&str>,
164 hint: Option<ai::Hint>) -> IoResult<Vec<ai::Info>>;
165
166 // filesystem operations
167 fn fs_from_raw_fd(&mut self, fd: c_int, close: CloseBehavior)
168 -> Box<RtioFileStream:Send>;
169 fn fs_open(&mut self, path: &CString, fm: FileMode, fa: FileAccess)
170 -> IoResult<Box<RtioFileStream:Send>>;
171 fn fs_unlink(&mut self, path: &CString) -> IoResult<()>;
172 fn fs_stat(&mut self, path: &CString) -> IoResult<FileStat>;
173 fn fs_mkdir(&mut self, path: &CString,
174 mode: FilePermission) -> IoResult<()>;
175 fn fs_chmod(&mut self, path: &CString,
176 mode: FilePermission) -> IoResult<()>;
177 fn fs_rmdir(&mut self, path: &CString) -> IoResult<()>;
178 fn fs_rename(&mut self, path: &CString, to: &CString) -> IoResult<()>;
179 fn fs_readdir(&mut self, path: &CString, flags: c_int) ->
180 IoResult<Vec<Path>>;
181 fn fs_lstat(&mut self, path: &CString) -> IoResult<FileStat>;
182 fn fs_chown(&mut self, path: &CString, uid: int, gid: int) ->
183 IoResult<()>;
184 fn fs_readlink(&mut self, path: &CString) -> IoResult<Path>;
185 fn fs_symlink(&mut self, src: &CString, dst: &CString) -> IoResult<()>;
186 fn fs_link(&mut self, src: &CString, dst: &CString) -> IoResult<()>;
187 fn fs_utime(&mut self, src: &CString, atime: u64, mtime: u64) ->
188 IoResult<()>;
189
190 // misc
191 fn timer_init(&mut self) -> IoResult<Box<RtioTimer:Send>>;
192 fn spawn(&mut self, config: ProcessConfig)
193 -> IoResult<(Box<RtioProcess:Send>,
194 Vec<Option<Box<RtioPipe:Send>>>)>;
195 fn kill(&mut self, pid: libc::pid_t, signal: int) -> IoResult<()>;
196 fn pipe_open(&mut self, fd: c_int) -> IoResult<Box<RtioPipe:Send>>;
197 fn tty_open(&mut self, fd: c_int, readable: bool)
198 -> IoResult<Box<RtioTTY:Send>>;
199 fn signal(&mut self, signal: Signum, channel: Sender<Signum>)
200 -> IoResult<Box<RtioSignal:Send>>;
201 }
202
203 pub trait RtioTcpListener : RtioSocket {
204 fn listen(~self) -> IoResult<Box<RtioTcpAcceptor:Send>>;
205 }
206
207 pub trait RtioTcpAcceptor : RtioSocket {
208 fn accept(&mut self) -> IoResult<Box<RtioTcpStream:Send>>;
209 fn accept_simultaneously(&mut self) -> IoResult<()>;
210 fn dont_accept_simultaneously(&mut self) -> IoResult<()>;
211 fn set_timeout(&mut self, timeout: Option<u64>);
212 }
213
214 pub trait RtioTcpStream : RtioSocket {
215 fn read(&mut self, buf: &mut [u8]) -> IoResult<uint>;
216 fn write(&mut self, buf: &[u8]) -> IoResult<()>;
217 fn peer_name(&mut self) -> IoResult<SocketAddr>;
218 fn control_congestion(&mut self) -> IoResult<()>;
219 fn nodelay(&mut self) -> IoResult<()>;
220 fn keepalive(&mut self, delay_in_seconds: uint) -> IoResult<()>;
221 fn letdie(&mut self) -> IoResult<()>;
222 fn clone(&self) -> Box<RtioTcpStream:Send>;
223 fn close_write(&mut self) -> IoResult<()>;
224 fn close_read(&mut self) -> IoResult<()>;
225 fn set_timeout(&mut self, timeout_ms: Option<u64>);
226 fn set_read_timeout(&mut self, timeout_ms: Option<u64>);
227 fn set_write_timeout(&mut self, timeout_ms: Option<u64>);
228 }
229
230 pub trait RtioSocket {
231 fn socket_name(&mut self) -> IoResult<SocketAddr>;
232 }
233
234 pub trait RtioUdpSocket : RtioSocket {
235 fn recvfrom(&mut self, buf: &mut [u8]) -> IoResult<(uint, SocketAddr)>;
236 fn sendto(&mut self, buf: &[u8], dst: SocketAddr) -> IoResult<()>;
237
238 fn join_multicast(&mut self, multi: IpAddr) -> IoResult<()>;
239 fn leave_multicast(&mut self, multi: IpAddr) -> IoResult<()>;
240
241 fn loop_multicast_locally(&mut self) -> IoResult<()>;
242 fn dont_loop_multicast_locally(&mut self) -> IoResult<()>;
243
244 fn multicast_time_to_live(&mut self, ttl: int) -> IoResult<()>;
245 fn time_to_live(&mut self, ttl: int) -> IoResult<()>;
246
247 fn hear_broadcasts(&mut self) -> IoResult<()>;
248 fn ignore_broadcasts(&mut self) -> IoResult<()>;
249
250 fn clone(&self) -> Box<RtioUdpSocket:Send>;
251 fn set_timeout(&mut self, timeout_ms: Option<u64>);
252 fn set_read_timeout(&mut self, timeout_ms: Option<u64>);
253 fn set_write_timeout(&mut self, timeout_ms: Option<u64>);
254 }
255
256 pub trait RtioTimer {
257 fn sleep(&mut self, msecs: u64);
258 fn oneshot(&mut self, msecs: u64) -> Receiver<()>;
259 fn period(&mut self, msecs: u64) -> Receiver<()>;
260 }
261
262 pub trait RtioFileStream {
263 fn read(&mut self, buf: &mut [u8]) -> IoResult<int>;
264 fn write(&mut self, buf: &[u8]) -> IoResult<()>;
265 fn pread(&mut self, buf: &mut [u8], offset: u64) -> IoResult<int>;
266 fn pwrite(&mut self, buf: &[u8], offset: u64) -> IoResult<()>;
267 fn seek(&mut self, pos: i64, whence: SeekStyle) -> IoResult<u64>;
268 fn tell(&self) -> IoResult<u64>;
269 fn fsync(&mut self) -> IoResult<()>;
270 fn datasync(&mut self) -> IoResult<()>;
271 fn truncate(&mut self, offset: i64) -> IoResult<()>;
272 }
273
274 pub trait RtioProcess {
275 fn id(&self) -> libc::pid_t;
276 fn kill(&mut self, signal: int) -> IoResult<()>;
277 fn wait(&mut self) -> ProcessExit;
278 }
279
280 pub trait RtioPipe {
281 fn read(&mut self, buf: &mut [u8]) -> IoResult<uint>;
282 fn write(&mut self, buf: &[u8]) -> IoResult<()>;
283 fn clone(&self) -> Box<RtioPipe:Send>;
284
285 fn close_write(&mut self) -> IoResult<()>;
286 fn close_read(&mut self) -> IoResult<()>;
287 fn set_timeout(&mut self, timeout_ms: Option<u64>);
288 fn set_read_timeout(&mut self, timeout_ms: Option<u64>);
289 fn set_write_timeout(&mut self, timeout_ms: Option<u64>);
290 }
291
292 pub trait RtioUnixListener {
293 fn listen(~self) -> IoResult<Box<RtioUnixAcceptor:Send>>;
294 }
295
296 pub trait RtioUnixAcceptor {
297 fn accept(&mut self) -> IoResult<Box<RtioPipe:Send>>;
298 fn set_timeout(&mut self, timeout: Option<u64>);
299 }
300
301 pub trait RtioTTY {
302 fn read(&mut self, buf: &mut [u8]) -> IoResult<uint>;
303 fn write(&mut self, buf: &[u8]) -> IoResult<()>;
304 fn set_raw(&mut self, raw: bool) -> IoResult<()>;
305 fn get_winsize(&mut self) -> IoResult<(int, int)>;
306 fn isatty(&self) -> bool;
307 }
308
309 pub trait PausableIdleCallback {
310 fn pause(&mut self);
311 fn resume(&mut self);
312 }
313
314 pub trait RtioSignal {}
libstd/rt/rtio.rs:261:1-261:1 -trait- definition:
pub trait RtioFileStream {
fn read(&mut self, buf: &mut [u8]) -> IoResult<int>;
fn write(&mut self, buf: &[u8]) -> IoResult<()>;
references:- 4167: fn fs_from_raw_fd(&mut self, fd: c_int, close: CloseBehavior)
168: -> Box<RtioFileStream:Send>;
169: fn fs_open(&mut self, path: &CString, fm: FileMode, fa: FileAccess)
170: -> IoResult<Box<RtioFileStream:Send>>;
171: fn fs_unlink(&mut self, path: &CString) -> IoResult<()>;
libstd/io/fs.rs:
81: pub struct File {
82: fd: Box<RtioFileStream:Send>,
83: path: Path,
libstd/io/stdio.rs:
75: TTY(Box<RtioTTY:Send>),
76: File(Box<RtioFileStream:Send>),
77: }
libstd/rt/rtio.rs:213:1-213:1 -trait- definition:
pub trait RtioTcpStream : RtioSocket {
fn read(&mut self, buf: &mut [u8]) -> IoResult<uint>;
fn write(&mut self, buf: &[u8]) -> IoResult<()>;
references:- 5221: fn letdie(&mut self) -> IoResult<()>;
222: fn clone(&self) -> Box<RtioTcpStream:Send>;
223: fn close_write(&mut self) -> IoResult<()>;
libstd/io/net/tcp.rs:
52: impl TcpStream {
53: fn new(s: Box<RtioTcpStream:Send>) -> TcpStream {
54: TcpStream { obj: s }
libstd/rt/rtio.rs:273:1-273:1 -trait- definition:
pub trait RtioProcess {
fn id(&self) -> libc::pid_t;
fn kill(&mut self, signal: int) -> IoResult<()>;
references:- 2libstd/io/process.rs:
55: pub struct Process {
56: handle: Box<RtioProcess:Send>,
libstd/rt/rtio.rs:
192: fn spawn(&mut self, config: ProcessConfig)
193: -> IoResult<(Box<RtioProcess:Send>,
194: Vec<Option<Box<RtioPipe:Send>>>)>;
libstd/rt/rtio.rs:291:1-291:1 -trait- definition:
pub trait RtioUnixListener {
fn listen(~self) -> IoResult<Box<RtioUnixAcceptor:Send>>;
}
references:- 2159: fn unix_bind(&mut self, path: &CString)
160: -> IoResult<Box<RtioUnixListener:Send>>;
161: fn unix_connect(&mut self, path: &CString,
libstd/io/net/unix.rs:
138: /// The internal, opaque runtime Unix listener.
139: obj: Box<RtioUnixListener:Send>,
140: }
libstd/rt/rtio.rs:202:1-202:1 -trait- definition:
pub trait RtioTcpListener : RtioSocket {
fn listen(~self) -> IoResult<Box<RtioTcpAcceptor:Send>>;
}
references:- 2155: fn tcp_bind(&mut self, addr: SocketAddr)
156: -> IoResult<Box<RtioTcpListener:Send>>;
157: fn udp_bind(&mut self, addr: SocketAddr)
libstd/io/net/tcp.rs:
282: pub struct TcpListener {
283: obj: Box<RtioTcpListener:Send>,
284: }
libstd/rt/rtio.rs:300:1-300:1 -trait- definition:
pub trait RtioTTY {
fn read(&mut self, buf: &mut [u8]) -> IoResult<uint>;
fn write(&mut self, buf: &[u8]) -> IoResult<()>;
references:- 2197: fn tty_open(&mut self, fd: c_int, readable: bool)
198: -> IoResult<Box<RtioTTY:Send>>;
199: fn signal(&mut self, signal: Signum, channel: Sender<Signum>)
libstd/io/stdio.rs:
74: enum StdSource {
75: TTY(Box<RtioTTY:Send>),
76: File(Box<RtioFileStream:Send>),
libstd/rt/rtio.rs:313:1-313:1 -trait- definition:
pub trait RtioSignal {}
references:- 2libstd/io/signal.rs:
84: /// A map from signums to handles to keep the handles in memory
85: handles: Vec<(Signum, Box<RtioSignal:Send>)>,
86: /// This is where all the handles send signums, which are received by
libstd/rt/rtio.rs:
199: fn signal(&mut self, signal: Signum, channel: Sender<Signum>)
200: -> IoResult<Box<RtioSignal:Send>>;
201: }
libstd/rt/rtio.rs:206:1-206:1 -trait- definition:
pub trait RtioTcpAcceptor : RtioSocket {
fn accept(&mut self) -> IoResult<Box<RtioTcpStream:Send>>;
fn accept_simultaneously(&mut self) -> IoResult<()>;
references:- 2203: pub trait RtioTcpListener : RtioSocket {
204: fn listen(~self) -> IoResult<Box<RtioTcpAcceptor:Send>>;
205: }
libstd/io/net/tcp.rs:
315: pub struct TcpAcceptor {
316: obj: Box<RtioTcpAcceptor:Send>,
317: }
libstd/rt/rtio.rs:279:1-279:1 -trait- definition:
pub trait RtioPipe {
fn read(&mut self, buf: &mut [u8]) -> IoResult<uint>;
fn write(&mut self, buf: &[u8]) -> IoResult<()>;
references:- 8193: -> IoResult<(Box<RtioProcess:Send>,
194: Vec<Option<Box<RtioPipe:Send>>>)>;
195: fn kill(&mut self, pid: libc::pid_t, signal: int) -> IoResult<()>;
--
296: pub trait RtioUnixAcceptor {
297: fn accept(&mut self) -> IoResult<Box<RtioPipe:Send>>;
298: fn set_timeout(&mut self, timeout: Option<u64>);
libstd/io/net/unix.rs:
38: pub struct UnixStream {
39: obj: Box<RtioPipe:Send>,
40: }
libstd/io/pipe.rs:
26: /// The internal, opaque runtime pipe object.
27: obj: Box<RtioPipe:Send>,
28: }
--
57: #[doc(hidden)]
58: pub fn new(inner: Box<RtioPipe:Send>) -> PipeStream {
59: PipeStream { obj: inner }
libstd/rt/rtio.rs:
195: fn kill(&mut self, pid: libc::pid_t, signal: int) -> IoResult<()>;
196: fn pipe_open(&mut self, fd: c_int) -> IoResult<Box<RtioPipe:Send>>;
197: fn tty_open(&mut self, fd: c_int, readable: bool)
libstd/rt/rtio.rs:36:1-36:1 -trait- definition:
pub trait Callback {
fn call(&mut self);
}
references:- 243: fn callback(&mut self, arg: proc():Send);
44: fn pausable_idle_callback(&mut self, Box<Callback:Send>)
45: -> Box<PausableIdleCallback:Send>;
46: fn remote_callback(&mut self, Box<Callback:Send>)
47: -> Box<RemoteCallback:Send>;
libstd/rt/rtio.rs:255:1-255:1 -trait- definition:
pub trait RtioTimer {
fn sleep(&mut self, msecs: u64);
fn oneshot(&mut self, msecs: u64) -> Receiver<()>;
references:- 2libstd/io/timer.rs:
67: pub struct Timer {
68: obj: Box<RtioTimer:Send>,
69: }
libstd/rt/rtio.rs:
190: // misc
191: fn timer_init(&mut self) -> IoResult<Box<RtioTimer:Send>>;
192: fn spawn(&mut self, config: ProcessConfig)
libstd/rt/rtio.rs:89:1-89:1 -struct- definition:
pub struct LocalIo<'a> {
factory: &'a mut IoFactory,
}
references:- 7136: pub fn new<'a>(io: &'a mut IoFactory) -> LocalIo<'a> {
137: LocalIo { factory: io }
138: }
libstd/rt/mod.rs:
166: f: proc():Send);
167: fn local_io<'a>(&'a mut self) -> Option<rtio::LocalIo<'a>>;
168: /// The (low, high) edges of the current stack.
libstd/rt/task.rs:
280: /// which is why the return type is `Option`
281: pub fn local_io<'a>(&'a mut self) -> Option<LocalIo<'a>> {
282: self.imp.get_mut_ref().local_io()
libstd/rt/rtio.rs:
104: /// the native I/O services.
105: pub fn borrow() -> Option<LocalIo> {
106: // FIXME(#11053): bad
libstd/rt/rtio.rs:150:1-150:1 -trait- definition:
pub trait IoFactory {
// networking
fn tcp_connect(&mut self, addr: SocketAddr,
references:- 590: pub struct LocalIo<'a> {
91: factory: &'a mut IoFactory,
92: }
--
136: pub fn new<'a>(io: &'a mut IoFactory) -> LocalIo<'a> {
137: LocalIo { factory: io }
--
141: #[inline]
142: pub fn get<'a>(&'a mut self) -> &'a mut IoFactory {
143: // FIXME(pcwalton): I think this is actually sound? Could borrow check
libstd/rt/rtio.rs:233:1-233:1 -trait- definition:
pub trait RtioUdpSocket : RtioSocket {
fn recvfrom(&mut self, buf: &mut [u8]) -> IoResult<(uint, SocketAddr)>;
fn sendto(&mut self, buf: &[u8], dst: SocketAddr) -> IoResult<()>;
references:- 3250: fn clone(&self) -> Box<RtioUdpSocket:Send>;
251: fn set_timeout(&mut self, timeout_ms: Option<u64>);
libstd/io/net/udp.rs:
58: pub struct UdpSocket {
59: obj: Box<RtioUdpSocket:Send>,
60: }
libstd/rt/rtio.rs:229:1-229:1 -trait- definition:
pub trait RtioSocket {
fn socket_name(&mut self) -> IoResult<SocketAddr>;
}
references:- 4207: pub trait RtioTcpAcceptor : RtioSocket {
208: fn accept(&mut self) -> IoResult<Box<RtioTcpStream:Send>>;
--
234: pub trait RtioUdpSocket : RtioSocket {
235: fn recvfrom(&mut self, buf: &mut [u8]) -> IoResult<(uint, SocketAddr)>;
libstd/rt/rtio.rs:295:1-295:1 -trait- definition:
pub trait RtioUnixAcceptor {
fn accept(&mut self) -> IoResult<Box<RtioPipe:Send>>;
fn set_timeout(&mut self, timeout: Option<u64>);
references:- 2292: pub trait RtioUnixListener {
293: fn listen(~self) -> IoResult<Box<RtioUnixAcceptor:Send>>;
294: }
libstd/io/net/unix.rs:
180: /// The internal, opaque runtime Unix acceptor.
181: obj: Box<RtioUnixAcceptor:Send>,
182: }