custos
custos copied to clipboard
`AsRange` does not implement all Range types
custos optionally supports caching. Keeping track of which buffer should be returned is done using Cursor, which provides a range method as seen here in an example:
use crate::{CPU, Cached, Base, Buffer, Cursor, Retriever};
let dev = CPU::<Cached<Base>>::new();
for _i in dev.range(10) {
let _x: Buffer<u8, _> = dev.retrieve(3, ()).unwrap();
}
However, not every Range type is supported, e.g:
// fails to compile
dev.range(..10);
dev.range(5..);