pub struct Buffer<T, CB, P> { /* 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, CB: Default, P> Buffer<T, CB, P>
impl<T, CB: Default, P> Buffer<T, CB, P>
source§impl<T, C: Container, P: Push<Bundle<T, C>>> Buffer<T, CapacityContainerBuilder<C>, P>
impl<T, C: Container, P: Push<Bundle<T, C>>> Buffer<T, CapacityContainerBuilder<C>, P>
sourcepub fn session(
&mut self,
time: &T
) -> Session<'_, T, CapacityContainerBuilder<C>, P>
pub fn session( &mut self, time: &T ) -> Session<'_, T, CapacityContainerBuilder<C>, P>
Returns a Session
, which accepts data to send at the associated time
sourcepub fn autoflush_session(
&mut self,
cap: Capability<T>
) -> AutoflushSession<'_, T, CapacityContainerBuilder<C>, P>where
T: Timestamp,
pub fn autoflush_session(
&mut self,
cap: Capability<T>
) -> AutoflushSession<'_, T, CapacityContainerBuilder<C>, P>where
T: Timestamp,
Allocates a new AutoflushSession
which flushes itself on drop.
source§impl<T, CB: ContainerBuilder, P: Push<Bundle<T, CB::Container>>> Buffer<T, CB, P>
impl<T, CB: ContainerBuilder, P: Push<Bundle<T, CB::Container>>> Buffer<T, CB, P>
sourcepub fn session_with_builder(&mut self, time: &T) -> Session<'_, T, CB, P>
pub fn session_with_builder(&mut self, time: &T) -> Session<'_, T, CB, P>
Returns a Session
, which accepts data to send at the associated time
sourcepub fn autoflush_session_with_builder(
&mut self,
cap: Capability<T>
) -> AutoflushSession<'_, T, CB, P>where
T: Timestamp,
pub fn autoflush_session_with_builder(
&mut self,
cap: Capability<T>
) -> AutoflushSession<'_, T, CB, P>where
T: Timestamp,
Allocates a new AutoflushSession
which flushes itself on drop.
Trait Implementations§
Auto Trait Implementations§
impl<T, CB, P> Freeze for Buffer<T, CB, P>
impl<T, CB, P> RefUnwindSafe for Buffer<T, CB, P>
impl<T, CB, P> Send for Buffer<T, CB, P>
impl<T, CB, P> Sync for Buffer<T, CB, P>
impl<T, CB, P> Unpin for Buffer<T, CB, P>
impl<T, CB, P> UnwindSafe for Buffer<T, CB, 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
source§impl<R, O, T> CopyOnto<ConsecutiveOffsetPairs<R, O>> for T
impl<R, O, T> CopyOnto<ConsecutiveOffsetPairs<R, O>> for T
source§fn copy_onto(
self,
target: &mut ConsecutiveOffsetPairs<R, O>
) -> <ConsecutiveOffsetPairs<R, O> as Region>::Index
fn copy_onto( self, target: &mut ConsecutiveOffsetPairs<R, O> ) -> <ConsecutiveOffsetPairs<R, O> as Region>::Index
Copy self into the target container, returning an index that allows to
look up the corresponding read item.