custos icon indicating copy to clipboard operation
custos copied to clipboard

`AsRange` does not implement all Range types

Open elftausend opened this issue 1 year ago • 0 comments

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..);

elftausend avatar Sep 10 '24 10:09 elftausend