pub struct DeviceLoadSelector { /* private fields */ }Expand description
Standalone load-only runtime selector — the unit-testable core of
the C2 load decision (design §3.3(b)). It ranks viable candidates by
(load_tier, original_index) and picks the minimum: the least-loaded
arm, ties broken toward the static winner (lowest index).
NOT the production path — production folds the load leg into
super::ChainedSelector so it composes with the VRAM guard + Judge
rank in one key (a standalone load selector can’t see VRAM, so it could
pick a busy-but-fitting device’s idle peer that won’t fit — exactly the
composition problem ChainedSelector exists to solve). This selector
is the isolated proof that the load_tier leg picks the unloaded arm.
Implementations§
Source§impl DeviceLoadSelector
impl DeviceLoadSelector
Sourcepub fn new(lookup: Option<LoadLookup>) -> Self
pub fn new(lookup: Option<LoadLookup>) -> Self
Construct with a load lookup. None ⇒ every candidate is
LOAD_TIER_IDLE ⇒ the pick is set.winner() (the no-signal
degenerate, mirroring ChainedSelector with no signals).
Trait Implementations§
Source§impl Clone for DeviceLoadSelector
impl Clone for DeviceLoadSelector
Source§impl Debug for DeviceLoadSelector
impl Debug for DeviceLoadSelector
Source§impl RuntimeSelector for DeviceLoadSelector
impl RuntimeSelector for DeviceLoadSelector
Auto Trait Implementations§
impl !RefUnwindSafe for DeviceLoadSelector
impl !UnwindSafe for DeviceLoadSelector
impl Freeze for DeviceLoadSelector
impl Send for DeviceLoadSelector
impl Sync for DeviceLoadSelector
impl Unpin for DeviceLoadSelector
impl UnsafeUnpin for DeviceLoadSelector
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more