pub struct BufferCore<T, D: Container, P: Push<BundleCore<T, D>>> { /* private fields */ }
Expand description
Buffers data sent at the same time, for efficient communication.
The Buffer
type should be used by calling session
with a time, which checks whether
data must be flushed and creates a Session
object which allows sending at the given time.
Implementations§
source§impl<T, C: Container, P: Push<BundleCore<T, C>>> BufferCore<T, C, P>
impl<T, C: Container, P: Push<BundleCore<T, C>>> BufferCore<T, C, P>
sourcepub fn session(&mut self, time: &T) -> Session<'_, T, C, P>
pub fn session(&mut self, time: &T) -> Session<'_, T, C, P>
Returns a Session
, which accepts data to send at the associated time
sourcepub fn autoflush_session(
&mut self,
cap: Capability<T>
) -> AutoflushSessionCore<'_, T, C, P>where
T: Timestamp,
pub fn autoflush_session(
&mut self,
cap: Capability<T>
) -> AutoflushSessionCore<'_, T, C, P>where
T: Timestamp,
Allocates a new AutoflushSession
which flushes itself on drop.
Trait Implementations§
Auto Trait Implementations§
impl<T, D, P> RefUnwindSafe for BufferCore<T, D, P>
impl<T, D, P> Send for BufferCore<T, D, P>
impl<T, D, P> Sync for BufferCore<T, D, P>
impl<T, D, P> Unpin for BufferCore<T, D, P>
impl<T, D, P> UnwindSafe for BufferCore<T, D, P>
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