pub enum RegionCallbackRegionError {
NotDrained(Region),
}Expand description
Engine::push_region_callback’s one typed-error variant — the
region_callback analogue of crate::sched::RegionQueuePushError
(review fix, Task 4 r1): only Region::Reactive and Region::Postponed
are ever drained by sched::control::Engine::drain_region_callbacks
(called from run_until/step_region for exactly those two regions —
see that method’s own doc comment). A callback registered for
Region::Active, Region::Inactive or Region::Nba would otherwise be
pushed into Engine::region_callbacks and never drained: not an error,
not a panic, not a log — just a silent leak that never fires. Mirroring
RegionQueuePushError’s own established precedent for exactly this
shape (a Region-typed parameter where not every variant is actually
serviceable), this must be a loud typed Result, never a
debug_assert! (which compiles to nothing in release builds and so
reproduces the exact silent-drop this type exists to prevent).
Variants§
NotDrained(Region)
region is not one Engine::drain_region_callbacks ever drains.
Carries the offending region so the caller-bug diagnostic names it.
Trait Implementations§
Source§impl Clone for RegionCallbackRegionError
impl Clone for RegionCallbackRegionError
impl Copy for RegionCallbackRegionError
Source§impl Debug for RegionCallbackRegionError
impl Debug for RegionCallbackRegionError
Source§impl Display for RegionCallbackRegionError
impl Display for RegionCallbackRegionError
impl Eq for RegionCallbackRegionError
Source§impl Error for RegionCallbackRegionError
impl Error for RegionCallbackRegionError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
impl StructuralPartialEq for RegionCallbackRegionError
Auto Trait Implementations§
impl Freeze for RegionCallbackRegionError
impl RefUnwindSafe for RegionCallbackRegionError
impl Send for RegionCallbackRegionError
impl Sync for RegionCallbackRegionError
impl Unpin for RegionCallbackRegionError
impl UnsafeUnpin for RegionCallbackRegionError
impl UnwindSafe for RegionCallbackRegionError
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.