fn next(&mut self) -> Option<Self::Item> {
        if !self.done {
            let mut raw_buffer: Vec<u8> = vec![0u8; self.buffer_size];
            let bytes_read = match self.file.read(&mut raw_buffer) {
                Err(e) => {
                    return Some(Err(e));
                }
                Ok(b) => b,
            };

            self.done = !(bytes_read == self.buffer_size);
            let pad: bool = self.action == des::Action::Encrypt && self.done;
            let buffer: Vec<u64> = prepare_input(&raw_buffer[0..bytes_read].to_vec(), pad);

            return Some(Ok(Chunk {
                data: buffer,
                is_last_chunk: self.done,
            }));
        }
        return None;
    }
// Read BUFFER_SIZE 64 bit blocks from the file, add padding to
// the last block if necessary, and return a vector of u64.
Read BUFFER_SIZE 64 bit blocks from the file, add padding to
the last block if necessary, and return a vector of u64.
Read BUFFER_SIZE 64 bit blocks from the file add padding to the last block if necessary and return a vector of u64 .
fn next(&mut self) -> Option<Self::Item> {
        if !self.done {
            let mut raw_buffer: Vec<u8> = vec![0u8; self.buffer_size];
            let bytes_read = match self.file.read(&mut raw_buffer) {
                Err(e) => {
                    return Some(Err(e));
                }
                Ok(b) => b,
            };
            self.done = !(bytes_read == self.buffer_size);
            let pad: bool = self.action == des::Action::Encrypt && self.done;
            let buffer: Vec<u64> = prepare_input(&raw_buffer[0..bytes_read].to_vec(), pad);
            return Some(Ok(Chunk {
                data: buffer,
                is_last_chunk: self.done,
            }));
        }
        return None;
    }
fn next ( & mut self ) -> Option < Self :: Item > { if ! self . done { let mut raw_buffer : Vec < u8 > = vec ! [ 0u8 self buffer_size ] ; let bytes_read = match self . file . read ( & mut raw_buffer ) { Err ( e ) => { return Some ( Err ( e ) ) ; } Ok ( b ) => b , } ; self . done = ! ( bytes_read == self . buffer_size ) ; let pad : bool = self . action == des :: Action :: Encrypt && self . done ; let buffer : Vec < u64 > = prepare_input ( & raw_buffer [ 0 .. bytes_read ] . to_vec ( ) , pad ) ; return Some ( Ok ( Chunk { data : buffer , is_last_chunk : self . done , } ) ) ; } return None ; }
Read BUFFER_SIZE 64 bit blocks from the file, add padding to
the last block if necessary, and return a vector of u64.
Read BUFFER_SIZE 64 bit blocks from the file add padding to the last block if necessary and return a vector of u64 .
&mut self
&mut self