Skip to content

Commit f5ace24

Browse files
committed
clean up docs
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
1 parent 3a4f903 commit f5ace24

File tree

1 file changed

+9
-33
lines changed

1 file changed

+9
-33
lines changed

src/lib.rs

Lines changed: 9 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
//! A general purpose crate for working with timeouts and delays with futures.
22
//!
33
//! This crate is intended to provide general purpose timeouts and interval
4-
//! streams for working with `futures`. The implementation may not be optimized
5-
//! for your particular use case, though, so be sure to read up on the details
6-
//! if you're concerned about that!
4+
//! streams for working with `futures`.
75
//!
86
//! Basic usage of this crate is relatively simple:
97
//!
@@ -19,43 +17,21 @@
1917
//! # }
2018
//! ```
2119
//!
22-
//! And you're off to the races! Check out the API documentation for more
23-
//! details about the various methods on `Delay`.
24-
//!
25-
//! # Implementation details
26-
//!
27-
//! The `Delay` type is powered by an associated `Timer`. By
28-
//! default constructors like `Delay::new` use a global
29-
//! instance of `Timer` to power their usage. This global `Timer` is spawned
30-
//! onto a helper thread which continuously runs in the background sending out
31-
//! timer notifications.
32-
//!
33-
//! If needed, however, a `Timer` can be constructed manually and the
34-
//! `Delay::new_handle`-style methods can be used to create delays/intervals
35-
//! associated with a specific instance of `Timer`. Each `Timer` has a
36-
//! `TimerHandle` type which is used to associate new objects to it.
37-
//!
38-
//! Note that there's also a `TimerHandle::set_fallback` method which will
39-
//! globally configure the fallback timer handle as well if you'd like to run
40-
//! your own timer.
41-
//!
42-
//! Finally, the implementation of `Timer` itself is currently a binary heap.
43-
//! Timer insertion is O(log n) where n is the number of active timers, and so
44-
//! is firing a timer (which invovles removing from the heap).
20+
//! And you're off to the races!
4521
4622
#![deny(missing_docs)]
4723
#![warn(missing_debug_implementations)]
4824

49-
use arc_list::{ArcList, Node};
50-
use heap::{Heap, Slot};
51-
use heap_timer::HeapTimer;
52-
use timer::{Timer, TimerHandle, ScheduledTimer};
53-
54-
mod heap_timer;
5525
mod arc_list;
26+
mod delay;
5627
mod global;
5728
mod heap;
29+
mod heap_timer;
5830
mod timer;
5931

60-
mod delay;
32+
use arc_list::{ArcList, Node};
33+
use heap::{Heap, Slot};
34+
use heap_timer::HeapTimer;
35+
use timer::{ScheduledTimer, Timer, TimerHandle};
36+
6137
pub use self::delay::Delay;

0 commit comments

Comments
 (0)