This is a tracking issue for IoSlice::{advance, advance_slices}
and IoSliceMut::{advance, advance_slices}
.
Feature gate: #![feature(io_slice_advance)].
Steps:
Current API additions:
impl<'a> IoSlice<'a> { // And `IoSliceMut` pub fn advance(&mut self, n: usize); pub fn advance_slices(bufs: &mut &mut [IoSlice<'a>], n: usize); }
Old issue:
Writing rust-lang/futures-rs#1741 I needed to resort to unsafe code to change the underlying slice in IoSlice
(and IoSliceMut
). I'm missing a method that can change the underlying slice. @Nemo157 said that I should open an issue.
Current idea would be something like Buf::advance
from the bytes crate.
impl IoSlice { // Advance the internal cursors of the slice by `n` bytes. fn advance(&mut self, n: usize) { // .. } }
thomaseizinger, Ten0 and InsertCreativityHere
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4