pub(super) fn poll_seal(
        &mut self,
        cx: &mut Context<'_>,
    ) -> Poll<io::Result<DmaStreamReaderBuilder>> {
        let mut state = self.state.borrow_mut();
        match state.file_status {
            FileStatus::Open => {
                let file = ensure_not_closed!(self.file.clone());
                state.initiate_close(cx.waker().clone(), self.state.clone(), file, false);
                Poll::Pending
            }
            FileStatus::Closing => {
                state.file_status = FileStatus::Closed;
                let file = ensure_not_closed!(self.file);

                let wb = state.write_behind;
                let bufsz = state.buffer_size;
                let builder = DmaStreamReaderBuilder::from_rc(file)
                    .with_read_ahead(wb)
                    .with_buffer_size(bufsz);

                match current_error!(state) {
                    Some(err) => Poll::Ready(err),
                    None => Poll::Ready(Ok(builder)),
                }
            }
            FileStatus::Closed => {
                already_closed!()
            }
        }
    }
// internal function that does everything that close does (flushes buffers, etc,
// but leaves the file open. Useful for the immutable file abstraction.
internal function that does everything that close does (flushes buffers, etc,
but leaves the file open. Useful for the immutable file abstraction.
internal function that does everything that close does ( flushes buffers etc but leaves the file open . Useful for the immutable file abstraction .
pub(super) fn poll_seal(
        &mut self,
        cx: &mut Context<'_>,
    ) -> Poll<io::Result<DmaStreamReaderBuilder>> {
        let mut state = self.state.borrow_mut();
        match state.file_status {
            FileStatus::Open => {
                let file = ensure_not_closed!(self.file.clone());
                state.initiate_close(cx.waker().clone(), self.state.clone(), file, false);
                Poll::Pending
            }
            FileStatus::Closing => {
                state.file_status = FileStatus::Closed;
                let file = ensure_not_closed!(self.file);
                let wb = state.write_behind;
                let bufsz = state.buffer_size;
                let builder = DmaStreamReaderBuilder::from_rc(file)
                    .with_read_ahead(wb)
                    .with_buffer_size(bufsz);
                match current_error!(state) {
                    Some(err) => Poll::Ready(err),
                    None => Poll::Ready(Ok(builder)),
                }
            }
            FileStatus::Closed => {
                already_closed!()
            }
        }
    }
pub ( super ) fn poll_seal ( & mut self , cx : & mut Context < ' _ > , ) -> Poll < io :: Result < DmaStreamReaderBuilder > > { let mut state = self . state . borrow_mut ( ) ; match state . file_status { FileStatus :: Open => { let file = ensure_not_closed ! ( self file clone ( ) ) ; state . initiate_close ( cx . waker ( ) . clone ( ) , self . state . clone ( ) , file , false ) ; Poll :: Pending } FileStatus :: Closing => { state . file_status = FileStatus :: Closed ; let file = ensure_not_closed ! ( self file ) ; let wb = state . write_behind ; let bufsz = state . buffer_size ; let builder = DmaStreamReaderBuilder :: from_rc ( file ) . with_read_ahead ( wb ) . with_buffer_size ( bufsz ) ; match current_error ! ( state ) { Some ( err ) => Poll :: Ready ( err ) , None => Poll :: Ready ( Ok ( builder ) ) , } } FileStatus :: Closed => { already_closed ! ( ) } } }
internal function that does everything that close does (flushes buffers, etc,
but leaves the file open.
internal function that does everything that close does ( flushes buffers etc but leaves the file open .
&mut self
cx
&mut Context<'_>
&mut self
cx
&mut Context<'_>