pub trait RandomAccessIterator<A>: Iterator<A> { fn indexable(&self) -> uint; fn idx(&self, index: uint) -> Option<A>; }
An object implementing random access indexing by uint
A RandomAccessIterator
should be either infinite or a DoubleEndedIterator
.
fn indexable(&self) -> uint
Return the number of indexable elements. At most std::uint::max_value
elements are indexable, even if the iterator represents a longer range.
fn idx(&self, index: uint) -> Option<A>
Return an element at an index
Prefix searches with a type followed by a colon (e.g.
fn:
) to restrict the search to a given type.
Accepted types are: fn
, mod
,
struct
(or str
), enum
,
trait
, typedef
(or
tdef
).