Struct hubs::HubsConsumer [−][src]
pub struct HubsConsumer<T> { /* fields omitted */ }
Expand description
The consumer side of the Hubs.
Use this one for reading data from the structure. See Hubs for an overview. The Hubs Consumer may be moved around threads. Do not try to do this whilst you borrowed a set of chunks, I haven’t tested that.
To get all committed chunks, call .get_chunks_for_tick()
.
You can not get only a part of these chunks. If you do not read all chunks retrieved in one read call, they are lost.
Implementations
pub fn get_chunks_for_tick(&self) -> ChunkBlock<'_, T>ⓘNotable traits for ChunkBlock<'a, T>impl<'a, T> Iterator for ChunkBlock<'a, T> type Item = &'a T;
pub fn get_chunks_for_tick(&self) -> ChunkBlock<'_, T>ⓘNotable traits for ChunkBlock<'a, T>impl<'a, T> Iterator for ChunkBlock<'a, T> type Item = &'a T;
Notable traits for ChunkBlock<'a, T>
impl<'a, T> Iterator for ChunkBlock<'a, T> type Item = &'a T;
Gives you all currently committed Chunks in a ChunkBlock. Once given out, it is your responsibility to either process them or allow them to be lost.