1 2 3 4 5 6 7 8 9 10
pub trait Tell { /// Gets the current position fn tell(&mut self) -> std::io::Result<u64>; } impl<S: std::io::Seek> Tell for S { fn tell(&mut self) -> std::io::Result<u64> { self.seek(std::io::SeekFrom::Current(0)) } }