Trait argdata::Seq [−][src]
pub trait Seq<'d> { fn iter_seq_next<'a>(
&'a self,
cookie: &mut usize
) -> Option<Result<ArgdataRef<'a, 'd>, ReadError>>
where
'd: 'a; }
An argdata value representing a sequence.
Required Methods
fn iter_seq_next<'a>(
&'a self,
cookie: &mut usize
) -> Option<Result<ArgdataRef<'a, 'd>, ReadError>> where
'd: 'a,
&'a self,
cookie: &mut usize
) -> Option<Result<ArgdataRef<'a, 'd>, ReadError>> where
'd: 'a,
Iterate to the next element, returning None if the end is reached.
You probably want to use iter_seq
instead, which gives you a normal Iterator.
cookie
should be 0 for the first element, and is modified by this method to refer to the
next element on each call. The value of the cookie
is implementation-specific. It might
for example be the index into a vector, or the byte-offset into an encoded argdata value.
Might panic if you give it an invalid cookie
.
Methods
impl<'a, 'd: 'a> Seq<'d> + 'a
[src]
impl<'a, 'd: 'a> Seq<'d> + 'a
ⓘImportant traits for SeqIterator<'a, 'd>pub fn iter_seq(&'a self) -> SeqIterator<'a, 'd>
[src]
ⓘImportant traits for SeqIterator<'a, 'd>
pub fn iter_seq(&'a self) -> SeqIterator<'a, 'd>
Get an iterator to the elements of the sequence.