hff_std/read_seek.rs
1use std::io::{Read, Seek};
2
3/// A wrapper trait with a blanket implementation for any type which
4/// supports both Read and Seek. The data source of the Hff must
5/// support this in order to retrieve metadata or chunk's from the
6/// stream. If the stream is not Seek, either use the provided
7/// `_full` variation which will return the ChunkCache or otherwise
8/// store the entire file somewhere which can be accessed with Seek.
9pub trait ReadSeek: Read + Seek {}
10
11// Implement over anything which can read and seek.
12impl<T: Read + Seek> ReadSeek for T {}