Casey Rodarmor
e10de1e94e
Derive Debug for Timeout and TimeoutToken
2017-10-09 20:16:38 -07:00
Alex Crichton
259c7a0884
Make poll_at private again
...
Unsure that we'll want to continue to expose this, stick to being conservative
for now.
2017-10-05 10:46:51 -07:00
Alex Gaynor
24dd856cfd
Fixed docs for Timeout::new and new_at
...
They no longer return futures, they return io::Result.
2017-09-22 11:01:34 -04:00
Ben Boeckel
de33e02c01
docs: fix some typos
2017-09-14 16:19:45 -04:00
Alex Crichton
25dcb1fab5
Add {Interval,Timeout}::poll_at
...
Some contexts, like EC2, have `Instant::now` as a relatively expensive function
to call. To help amortize the cost of this function this commit exposes a new
function on `Interval` and `Timeout` to pass in the assumed current time.
2017-09-12 22:55:58 -07:00
Alex Crichton
c13e7f3533
Clarify docs on Timeout::reset
2017-06-27 09:55:36 -07:00
Yuanchao Sun
6fb62d3232
Add a method to reset Timeout.
2017-06-27 11:34:56 +08:00
Paul Colomiets
411caa786d
Moves when to Timeout from TimeoutToken
2016-10-06 21:11:46 +03:00
Alex Crichton
66cff8e84b
Swap Handle/Pinned
...
* Handle -> Remote
* Pinned -> Handle
All APIs now take a `&Handle` by default and in general can return an immediate
`io::Result` instead of an `IoFuture`. This reflects how most usage will likely
be done through handles rather than remotes, and also all previous functionality
can be recovered with a `oneshot` plus `Remote::spawn`.
Closes #15
2016-09-07 22:12:41 -07:00
Alex Crichton
6c045d31ac
Reorganize the entire crate:
...
Renamed APIs
* Loop => reactor::Core
* LoopHandle => reactor::Handle
* LoopPin => reactor::Pinned
* TcpStream => net::TcpStream
* TcpListener => net::TcpListener
* UdpSocket => net::UdpSocket
* Sender => channel::Sender
* Receiver => channel::Receiver
* Timeout => reactor::Timeout
* ReadinessStream => reactor::PollEvented
* All `LoopHandle` methods to construct objects are now free functions on the
associated types, e.g. `LoopHandle::tcp_listen` is now `TcpListener::bind`
* All APIs taking a `Handle` now take a `Handle` as the last argument
* All future-returning APIs now return concrete types instead of trait objects
Added APIs
* io::Io trait -- Read + Write + ability to poll
Removed without replacement:
* AddSource
* AddTimeout
* IoToken
* TimeoutToken
Closes #3
Closes #6
2016-09-07 22:12:14 -07:00