Hey, I have a question. I want to build something like the following. I have a trait that defines a bundle. The bundle is a bundle of chunks that can either come from a file, or a cache of chunks (more files). I could store the chunks in a vector in the bundle, but if I have really large files, then the amount of RAM used gets pretty huge, so I want to implement an iterator that can either read from the file and return the chunk, or read from the chunk cache and return the chunk. Right now I'm trying to define something like the following:
trait Bundle {
fn id(&self) -> &ID;
fn size(&self) -> u64;
fn chunks<I: Iterator>(&self) -> Result<I, Error>;
}
pub struct FileBundle<P: AsRef<Path>> {