hibana 0.9.2

Session-typed choreographic programming for no_std Rust protocols, inspired by affine MPST
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)]
pub(crate) struct LocalOnly(PhantomData<*mut ()>);

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