hibana 0.5.3

Const-projected Affine Multiparty Session Types for choreography-first Rust protocols
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use core::marker::PhantomData;

/// Private marker used to keep runtime owners local-only.
///
/// `hibana`'s runtime is intentionally single-core, non-reentrant, and not
/// ISR-safe. Embedding owners carry this field so they cannot implement
/// `Send`/`Sync` accidentally.
#[derive(Clone, Copy, Debug, Default)]
pub(crate) struct LocalOnly(PhantomData<*mut ()>);

impl LocalOnly {
    #[inline]
    pub(crate) const fn new() -> Self {
        Self(PhantomData)
    }
}