fn next(&mut self) -> Option<Result<T>> {
        if !self.failed && self.read_elems < self.n_elems {
            Some({
                let res = self.read.load();

                // if ok, increment the iterator
                // if not ok, mark it as failed
                match res {
                    Ok(..) => self.read_elems += 1,
                    Err(..) => self.failed = true,
                };

                res
            })
        } else {
            None
        }
    }
// if the option returned is 'None', the array has been fully read.
if the option returned is 'None', the array has been fully read.
if the option returned is ' None ' the array has been fully read .
fn next(&mut self) -> Option<Result<T>> {
        if !self.failed && self.read_elems < self.n_elems {
            Some({
                let res = self.read.load();
                // if ok, increment the iterator
                // if not ok, mark it as failed
                match res {
                    Ok(..) => self.read_elems += 1,
                    Err(..) => self.failed = true,
                };
                res
            })
        } else {
            None
        }
    }
fn next ( & mut self ) -> Option < Result < T > > { if ! self . failed && self . read_elems < self . n_elems { Some ( { let res = self . read . load ( ) ; // if ok, increment the iterator // if not ok, mark it as failed match res { Ok ( .. ) => self . read_elems += 1 , Err ( .. ) => self . failed = true , } ; res } ) } else { None } }
if the option returned is 'None', the array has been fully read.
if the option returned is ' None ' the array has been fully read .
&mut self
&mut self