pub struct MemDriver<T: Processable> { /* private fields */ }Expand description
The core driver between the block stream and MST walker
In the future, PDSs will export CARs in a stream-friendly order that will enable processing them with tiny memory overhead. But that future is not here yet.
CARs are almost always in a stream-unfriendly order, so I’m reverting the optimistic stream features: we load all block first, then walk the MST.
This makes things much simpler: we only need to worry about spilling to disk in one place, and we always have a reasonable expecatation about how much work the init function will do. We can drop the CAR reader before walking, so the sync/async boundaries become a little easier to work around.
Implementations§
Source§impl<T: Processable> MemDriver<T>
impl<T: Processable> MemDriver<T>
Sourcepub async fn next_chunk(
&mut self,
n: usize,
) -> Result<Option<BlockChunk<T>>, DriveError>
pub async fn next_chunk( &mut self, n: usize, ) -> Result<Option<BlockChunk<T>>, DriveError>
Step through the record outputs, in rkey order
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for MemDriver<T>
impl<T> RefUnwindSafe for MemDriver<T>where
T: RefUnwindSafe,
impl<T> Send for MemDriver<T>where
T: Send,
impl<T> Sync for MemDriver<T>where
T: Sync,
impl<T> Unpin for MemDriver<T>where
T: Unpin,
impl<T> UnwindSafe for MemDriver<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more