pub fn skip(&mut self, bytes: u64) {
        let mut state = self.state.borrow_mut();
        let buffer_id = state.buffer_id(self.current_pos);
        self.current_pos = std::cmp::min(self.current_pos + bytes, self.end);
        let new_buffer_id = state.buffer_id(self.current_pos);
        if buffer_id != new_buffer_id {
            let candidate_read_ahead_pos = align_down(self.current_pos, self.buffer_size);
            state.buffer_read_ahead_current_pos = std::cmp::max(
                state.buffer_read_ahead_current_pos,
                candidate_read_ahead_pos,
            );

            // remember the end range is exclusive so if we didn't cross a buffer
            // we don't discard anything
            for id in buffer_id..new_buffer_id {
                state.discard_buffer(id);
            }
            state.replenish_read_ahead(self.state.clone(), self.file.clone());
        }
    }
/// Skip reading bytes from this [`DmaStreamReader`].
///
/// The file cursor is advanced by the provided bytes. As this is a linear
/// access API, once those bytes are skipped they are gone. If you need to
/// read those bytes, just not now, it is better to read them and save them
/// in some temporary buffer.
///
/// # Examples
/// ```no_run
/// use glommio::{
///     io::{DmaFile, DmaStreamReaderBuilder},
///     LocalExecutor,
/// };
///
/// let ex = LocalExecutor::default();
/// ex.run(async {
///     let file = DmaFile::open("myfile.txt").await.unwrap();
///     let mut reader = DmaStreamReaderBuilder::new(file).build();
///     assert_eq!(reader.current_pos(), 0);
///     reader.skip(8);
///     assert_eq!(reader.current_pos(), 8);
///     reader.close().await.unwrap();
/// });
/// ```
///
/// [`DmaStreamReader`]: struct.DmaStreamReader.html
Skip reading bytes from this [`DmaStreamReader`].
The file cursor is advanced by the provided bytes. As this is a linear
access API, once those bytes are skipped they are gone. If you need to
read those bytes, just not now, it is better to read them and save them
in some temporary buffer.
Skip reading bytes from this [ ` DmaStreamReader ` ] . The file cursor is advanced by the provided bytes . As this is a linear access API once those bytes are skipped they are gone . If you need to read those bytes just not now it is better to read them and save them in some temporary buffer .
pub fn skip(&mut self, bytes: u64) {
        let mut state = self.state.borrow_mut();
        let buffer_id = state.buffer_id(self.current_pos);
        self.current_pos = std::cmp::min(self.current_pos + bytes, self.end);
        let new_buffer_id = state.buffer_id(self.current_pos);
        if buffer_id != new_buffer_id {
            let candidate_read_ahead_pos = align_down(self.current_pos, self.buffer_size);
            state.buffer_read_ahead_current_pos = std::cmp::max(
                state.buffer_read_ahead_current_pos,
                candidate_read_ahead_pos,
            );
            // remember the end range is exclusive so if we didn't cross a buffer
            // we don't discard anything
            for id in buffer_id..new_buffer_id {
                state.discard_buffer(id);
            }
            state.replenish_read_ahead(self.state.clone(), self.file.clone());
        }
    }
pub fn skip ( & mut self , bytes : u64 ) { let mut state = self . state . borrow_mut ( ) ; let buffer_id = state . buffer_id ( self . current_pos ) ; self . current_pos = std :: cmp :: min ( self . current_pos + bytes , self . end ) ; let new_buffer_id = state . buffer_id ( self . current_pos ) ; if buffer_id != new_buffer_id { let candidate_read_ahead_pos = align_down ( self . current_pos , self . buffer_size ) ; state . buffer_read_ahead_current_pos = std :: cmp :: max ( state . buffer_read_ahead_current_pos , candidate_read_ahead_pos , ) ; // remember the end range is exclusive so if we didn't cross a buffer // we don't discard anything for id in buffer_id .. new_buffer_id { state . discard_buffer ( id ) ; } state . replenish_read_ahead ( self . state . clone ( ) , self . file . clone ( ) ) ; } }
Skip reading bytes from this [`DmaStreamReader`].
Skip reading bytes from this [ ` DmaStreamReader ` ] .
&mut self
bytes
u64
&mut self
bytes
u64
examples
```no_run
use glommio::{
io::{DmaFile, DmaStreamReaderBuilder},
LocalExecutor,
}.

let ex = LocalExecutor::default();
ex.run(async {
let file = DmaFile::open("myfile.txt").await.unwrap();
let mut reader = DmaStreamReaderBuilder::new(file).build();
assert_eq!(reader.current_pos(), 0);
reader.skip(8);
assert_eq!(reader.current_pos(), 8);
reader.close().await.unwrap();
});
```

[`DmaStreamReader`]: struct.DmaStreamReader.html
` ` ` no_run use glommio :: { io :: { DmaFile DmaStreamReaderBuilder } LocalExecutor } . let ex = LocalExecutor :: default () ; ex . run ( async { let file = DmaFile :: open ( " myfile . txt " ) . await . unwrap () ; let mut reader = DmaStreamReaderBuilder :: new ( file ) . build () ; assert_eq! ( reader . current_pos () 0 ) ; reader . skip ( 8 ) ; assert_eq! ( reader . current_pos () 8 ) ; reader . close () . await . unwrap () ; } ) ; ` ` ` [ ` DmaStreamReader ` ] : struct . DmaStreamReader . html