pub mod error;
pub mod prelude;
#[cfg(any(not(feature = "std"), test))]
pub mod cursor;
#[cfg(any(not(feature = "std"), test))]
mod no_std;
#[cfg(not(feature = "std"))]
pub use no_std::*;
#[cfg(feature = "std")]
pub use std::io::{Bytes, Cursor, Error, ErrorKind, Read, Result, Seek, SeekFrom};
pub trait StreamPosition {
fn stream_pos(&mut self) -> Result<u64>;
}
impl<T: Seek> StreamPosition for T {
#[rustversion::before(1.51)]
#[cfg(feature = "std")]
fn stream_pos(&mut self) -> Result<u64> {
self.seek(SeekFrom::Current(0))
}
#[rustversion::since(1.51)]
#[cfg(feature = "std")]
fn stream_pos(&mut self) -> Result<u64> {
self.stream_position()
}
#[cfg(not(feature = "std"))]
fn stream_pos(&mut self) -> Result<u64> {
self.stream_position()
}
}