extra: Mention extra::container::Deque trait in doc for RingBuf and DList
This commit is contained in:
parent
b2b88b326d
commit
0f9b9a5fb7
@ -11,6 +11,9 @@
|
|||||||
//! A doubly-linked list with owned nodes.
|
//! A doubly-linked list with owned nodes.
|
||||||
//!
|
//!
|
||||||
//! The DList allows pushing and popping elements at either end.
|
//! The DList allows pushing and popping elements at either end.
|
||||||
|
//!
|
||||||
|
//! DList implements the trait Deque. It should be imported with `use
|
||||||
|
//! extra::container::Deque`.
|
||||||
|
|
||||||
|
|
||||||
// DList is constructed like a singly-linked list over the field `next`.
|
// DList is constructed like a singly-linked list over the field `next`.
|
||||||
@ -27,7 +30,7 @@ use std::iterator::FromIterator;
|
|||||||
|
|
||||||
use container::Deque;
|
use container::Deque;
|
||||||
|
|
||||||
/// A doubly-linked list
|
/// A doubly-linked list.
|
||||||
pub struct DList<T> {
|
pub struct DList<T> {
|
||||||
priv length: uint,
|
priv length: uint,
|
||||||
priv list_head: Link<T>,
|
priv list_head: Link<T>,
|
||||||
|
@ -9,6 +9,9 @@
|
|||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
//! A double-ended queue implemented as a circular buffer
|
//! A double-ended queue implemented as a circular buffer
|
||||||
|
//!
|
||||||
|
//! RingBuf implements the trait Deque. It should be imported with `use
|
||||||
|
//! extra::container::Deque`.
|
||||||
|
|
||||||
use std::num;
|
use std::num;
|
||||||
use std::util;
|
use std::util;
|
||||||
@ -21,7 +24,7 @@ use container::Deque;
|
|||||||
static INITIAL_CAPACITY: uint = 8u; // 2^3
|
static INITIAL_CAPACITY: uint = 8u; // 2^3
|
||||||
static MINIMUM_CAPACITY: uint = 2u;
|
static MINIMUM_CAPACITY: uint = 2u;
|
||||||
|
|
||||||
#[allow(missing_doc)]
|
/// RingBuf is a circular buffer that implements Deque.
|
||||||
#[deriving(Clone)]
|
#[deriving(Clone)]
|
||||||
pub struct RingBuf<T> {
|
pub struct RingBuf<T> {
|
||||||
priv nelts: uint,
|
priv nelts: uint,
|
||||||
|
Loading…
Reference in New Issue
Block a user