pub enum Placement {
Only(CoreId),
AnyOther,
Any,
AnyOf(Vec<CoreId>),
}Expand description
Which core, stated as intent rather than as an index the caller computed.
The trait’s primitive takes a single CoreId, so anything other than
Only has to be resolved before dispatch — and resolution needs
current_core() and num_cores(), both of which the trait already exposes.
Expressing the intent here rather than at the call site is also what makes
SpawnError::InboxFull recoverable: a candidate set can be retried across
cores, where a single id can only be retried against the core that was
already full.
Variants§
Only(CoreId)
This exact core.
AnyOther
Any core except the one running this call — the usual intent when the point is to stop competing with the caller for its own core.
Any
Any core at all, current included.
AnyOf(Vec<CoreId>)
One of these, in order, falling through on back-pressure.
Trait Implementations§
impl Eq for Placement
impl StructuralPartialEq for Placement
Auto Trait Implementations§
impl Freeze for Placement
impl RefUnwindSafe for Placement
impl Send for Placement
impl Sync for Placement
impl Unpin for Placement
impl UnsafeUnpin for Placement
impl UnwindSafe for Placement
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