We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Seek::stream_{len, position}
1 parent 598a1b4 commit c518f2dCopy full SHA for c518f2d
src/libstd/io/cursor.rs
@@ -212,6 +212,14 @@ impl<T> io::Seek for Cursor<T> where T: AsRef<[u8]> {
212
"invalid seek to a negative or overflowing position"))
213
}
214
215
+
216
+ fn stream_len(&mut self) -> io::Result<u64> {
217
+ Ok(self.inner.as_ref().len() as u64)
218
+ }
219
220
+ fn stream_position(&mut self) -> io::Result<u64> {
221
+ Ok(self.pos)
222
223
224
225
#[stable(feature = "rust1", since = "1.0.0")]
0 commit comments