pub struct ProbBranch {
pub label: String,
pub weight: f64,
pub cont: SType,
}Expand description
A probabilistic session choice, picking a branch by weighted probability.
Each branch has a label, a weight (non-negative), and a continuation type. The scheduler normalises weights to obtain probabilities and samples a branch.
Fields§
§label: StringHuman-readable label for the branch.
weight: f64Relative weight (unnormalised); must be positive.
cont: STypeContinuation session type if this branch is chosen.
Auto Trait Implementations§
impl Freeze for ProbBranch
impl RefUnwindSafe for ProbBranch
impl Send for ProbBranch
impl Sync for ProbBranch
impl Unpin for ProbBranch
impl UnsafeUnpin for ProbBranch
impl UnwindSafe for ProbBranch
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