libs: doc comments

This commit is contained in:
Alexander Regueiro 2019-02-09 22:16:58 +00:00
parent b87363e763
commit 99ed06eb88
102 changed files with 394 additions and 387 deletions

View file

@ -50,14 +50,14 @@ impl SignalToken {
wake
}
/// Convert to an unsafe usize value. Useful for storing in a pipe's state
/// Converts to an unsafe usize value. Useful for storing in a pipe's state
/// flag.
#[inline]
pub unsafe fn cast_to_usize(self) -> usize {
mem::transmute(self.inner)
}
/// Convert from an unsafe usize value. Useful for retrieving a pipe's state
/// Converts from an unsafe usize value. Useful for retrieving a pipe's state
/// flag.
#[inline]
pub unsafe fn cast_from_usize(signal_ptr: usize) -> SignalToken {
@ -72,7 +72,7 @@ impl WaitToken {
}
}
/// Returns true if we wake up normally, false otherwise.
/// Returns `true` if we wake up normally.
pub fn wait_max_until(self, end: Instant) -> bool {
while !self.inner.woken.load(Ordering::SeqCst) {
let now = Instant::now();

View file

@ -148,7 +148,7 @@ impl Select {
}
/// Waits for an event on this receiver set. The returned value is *not* an
/// index, but rather an id. This id can be queried against any active
/// index, but rather an ID. This ID can be queried against any active
/// `Handle` structures (each one has an `id` method). The handle with
/// the matching `id` will have some sort of event available on it. The
/// event could either be that data is available or the corresponding
@ -251,7 +251,7 @@ impl Select {
}
impl<'rx, T: Send> Handle<'rx, T> {
/// Retrieves the id of this handle.
/// Retrieves the ID of this handle.
#[inline]
pub fn id(&self) -> usize { self.id }

View file

@ -1,4 +1,4 @@
/// Shared channels
/// Shared channels.
///
/// This is the flavor of channels which are not necessarily optimized for any
/// particular use case, but are the most general in how they are used. Shared