pub struct SessionTypeCompatibility;Expand description
Checks compatibility (duality) between two session types.
Implementations§
Source§impl SessionTypeCompatibility
impl SessionTypeCompatibility
Sourcepub fn dual(&self, s: &BinarySession) -> BinarySession
pub fn dual(&self, s: &BinarySession) -> BinarySession
Compute the dual of a session type (swap sends↔receives, select↔offer).
Sourcepub fn are_dual(&self, s1: &BinarySession, s2: &BinarySession) -> bool
pub fn are_dual(&self, s1: &BinarySession, s2: &BinarySession) -> bool
Check whether s1 and s2 are dual (i.e., compatible).
A process holding s1 can communicate with one holding s2.
Sourcepub fn compatible(&self, s1: &BinarySession, s2: &BinarySession) -> bool
pub fn compatible(&self, s1: &BinarySession, s2: &BinarySession) -> bool
Check that a pair of sessions can reduce to End together (session progress).
This is a simple syntactic check: both are End, or both are dual in one step.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SessionTypeCompatibility
impl RefUnwindSafe for SessionTypeCompatibility
impl Send for SessionTypeCompatibility
impl Sync for SessionTypeCompatibility
impl Unpin for SessionTypeCompatibility
impl UnsafeUnpin for SessionTypeCompatibility
impl UnwindSafe for SessionTypeCompatibility
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