pub struct BarrierController { /* private fields */ }Expand description
Full runtime barrier executor for in-process station sets.
Implementations§
Source§impl BarrierController
impl BarrierController
Sourcepub const fn active(&self) -> Option<RuntimeBarrier>
pub const fn active(&self) -> Option<RuntimeBarrier>
Returns the active barrier, if any.
Sourcepub fn request(
&mut self,
stations: &StationSet,
id: BarrierId,
scope: BarrierScope,
target_tick: Tick,
command_mode: CommandQueueMode,
) -> Result<BarrierProgress, BarrierRuntimeError>
pub fn request( &mut self, stations: &StationSet, id: BarrierId, scope: BarrierScope, target_tick: Tick, command_mode: CommandQueueMode, ) -> Result<BarrierProgress, BarrierRuntimeError>
Requests a barrier over stations matching scope.
Sourcepub fn poll(
&mut self,
stations: &StationSet,
) -> Result<BarrierProgress, BarrierRuntimeError>
pub fn poll( &mut self, stations: &StationSet, ) -> Result<BarrierProgress, BarrierRuntimeError>
Polls station ticks and freezes the barrier once all covered stations are aligned.
Sourcepub fn export_snapshots(
&mut self,
stations: &StationSet,
version: SnapshotVersion,
) -> Result<Vec<StationSnapshot>, BarrierRuntimeError>
pub fn export_snapshots( &mut self, stations: &StationSet, version: SnapshotVersion, ) -> Result<Vec<StationSnapshot>, BarrierRuntimeError>
Exports station snapshots while the barrier is frozen.
Sourcepub fn export_snapshots_into<'a>(
&mut self,
stations: &StationSet,
version: SnapshotVersion,
scratch: &'a mut BarrierSnapshotScratch,
) -> Result<&'a [StationSnapshot], BarrierRuntimeError>
pub fn export_snapshots_into<'a>( &mut self, stations: &StationSet, version: SnapshotVersion, scratch: &'a mut BarrierSnapshotScratch, ) -> Result<&'a [StationSnapshot], BarrierRuntimeError>
Exports frozen snapshots into caller-owned reusable Station slots.
Sourcepub fn resume(&mut self) -> Result<BarrierMetrics, BarrierRuntimeError>
pub fn resume(&mut self) -> Result<BarrierMetrics, BarrierRuntimeError>
Resumes all stations covered by the barrier and returns final metrics.
Sourcepub fn progress(&self) -> BarrierProgress
pub fn progress(&self) -> BarrierProgress
Returns current barrier progress.
Trait Implementations§
Source§impl Clone for BarrierController
impl Clone for BarrierController
Source§fn clone(&self) -> BarrierController
fn clone(&self) -> BarrierController
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BarrierController
impl Debug for BarrierController
Source§impl Default for BarrierController
impl Default for BarrierController
Source§fn default() -> BarrierController
fn default() -> BarrierController
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BarrierController
impl RefUnwindSafe for BarrierController
impl Send for BarrierController
impl Sync for BarrierController
impl Unpin for BarrierController
impl UnsafeUnpin for BarrierController
impl UnwindSafe for BarrierController
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