pub struct StationLoadSampler { /* private fields */ }Expand description
Runtime helper that derives StationLoadSample from existing low-level state.
Implementations§
Source§impl StationLoadSampler
impl StationLoadSampler
Sourcepub const fn new(config: StationLoadSamplerConfig) -> Self
pub const fn new(config: StationLoadSamplerConfig) -> Self
Creates a station load sampler.
Sourcepub const fn config(&self) -> StationLoadSamplerConfig
pub const fn config(&self) -> StationLoadSamplerConfig
Returns the sampler configuration.
Sourcepub fn sample_all_into<'a>(
&self,
stations: &StationSet,
indexes: &StationIndexSet,
router: &EventRouter,
subscriber_counts: &[(StationId, usize)],
scratch: &'a mut StationLoadSamplerScratch,
) -> &'a [StationLoadSample]
pub fn sample_all_into<'a>( &self, stations: &StationSet, indexes: &StationIndexSet, router: &EventRouter, subscriber_counts: &[(StationId, usize)], scratch: &'a mut StationLoadSamplerScratch, ) -> &'a [StationLoadSample]
Samples every station into caller-owned storage and returns its active prefix.
Reusing the same scratch retains subscriber, occupancy, station, and per-cell storage.
Trait Implementations§
Source§impl Clone for StationLoadSampler
impl Clone for StationLoadSampler
Source§fn clone(&self) -> StationLoadSampler
fn clone(&self) -> StationLoadSampler
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 moreimpl Copy for StationLoadSampler
Source§impl Debug for StationLoadSampler
impl Debug for StationLoadSampler
Source§impl Default for StationLoadSampler
impl Default for StationLoadSampler
impl Eq for StationLoadSampler
Source§impl PartialEq for StationLoadSampler
impl PartialEq for StationLoadSampler
impl StructuralPartialEq for StationLoadSampler
Auto Trait Implementations§
impl Freeze for StationLoadSampler
impl RefUnwindSafe for StationLoadSampler
impl Send for StationLoadSampler
impl Sync for StationLoadSampler
impl Unpin for StationLoadSampler
impl UnsafeUnpin for StationLoadSampler
impl UnwindSafe for StationLoadSampler
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