pub struct HubsConsumer<T> { /* private fields */ }
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§
Source§impl<T> HubsConsumer<T>
impl<T> HubsConsumer<T>
Sourcepub fn get_chunks_for_tick(&self) -> ChunkBlock<'_, T> ⓘ
pub fn get_chunks_for_tick(&self) -> ChunkBlock<'_, 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.
Auto Trait Implementations§
impl<T> Freeze for HubsConsumer<T>
impl<T> !RefUnwindSafe for HubsConsumer<T>
impl<T> Send for HubsConsumer<T>where
T: Send,
impl<T> Sync for HubsConsumer<T>where
T: Send,
impl<T> Unpin for HubsConsumer<T>
impl<T> !UnwindSafe for HubsConsumer<T>
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