pub enum Label {
Send {
model: Model,
dst: Tid,
val: Val,
},
Recv {
pred: Arc<Pred>,
blocking: bool,
},
Nondet {
set: Arc<[Val]>,
},
Error {
msg: Arc<str>,
},
}Expand description
Event label. Blocking is scheduler state, not a graph event, so it has no label here.
Nondet carries only the option set; the value it resolved to is a separate graph
annotation, just as a receive’s read value is its rf edge rather than part of its label.
The heap-carrying variants hold their payload behind an Arc, so cloning a Label
shares it; labels are immutable, so the sharing is sound.
Variants§
Send
Recv
Nondet
Data non-determinism: set is the finite option set, kept sorted and deduplicated
so the minimum is set[0] and enumeration is deterministic.
Error
Implementations§
Source§impl Label
impl Label
pub fn send(model: Model, dst: Tid, val: impl Into<Val>) -> Self
Sourcepub fn nondet(set: impl IntoIterator<Item = impl Into<Val>>) -> Self
pub fn nondet(set: impl IntoIterator<Item = impl Into<Val>>) -> Self
Non-deterministic choice over the finite option set set (sorted and deduplicated).
pub fn error(msg: impl Into<String>) -> Self
pub fn is_send(&self) -> bool
pub fn is_recv(&self) -> bool
pub fn is_nondet(&self) -> bool
pub fn is_error(&self) -> bool
pub fn model(&self) -> Option<Model>
pub fn dst(&self) -> Option<Tid>
Sourcepub fn val(&self) -> Option<&'static str>
pub fn val(&self) -> Option<&'static str>
A send’s payload resolved to its bytes. None for non-sends. Prefer
payload when the interned handle suffices (no resolve).
pub fn pred(&self) -> Option<&Pred>
pub fn blocking(&self) -> Option<bool>
Trait Implementations§
impl Eq for Label
impl StructuralPartialEq for Label
Auto Trait Implementations§
impl !RefUnwindSafe for Label
impl !UnwindSafe for Label
impl Freeze for Label
impl Send for Label
impl Sync for Label
impl Unpin for Label
impl UnsafeUnpin for Label
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