o3 0.62.0

shared-nothing primitives
Documentation

o3

shared-nothing primitives

base < alloc < mem < depot < buffer

check once

admission -> original borrow -> infallible use

fn store(slot: &mut u64, value: u64) {
    *slot = value;
}

fn store_at(slots: &mut [u64], index: usize, value: u64) -> Option<()> {
    let slot = slots.get_mut(index)?;
    store(slot, value);
    Some(())
}

generative brands

matching identity -> exclusive access

zero-sized token

use o3::base::cell::region::{Brand, Token, Value};

fn store<B: Brand>(token: &mut Token<B>, cell: &Value<B, u64>, value: u64) {
    *token.borrow_mut(cell) = value;
}

let value = Token::scope(|mut token| {
    let cell = token.bind(1_u64);
    store(&mut token, &cell, 2);
    cell.into_inner()
});

credits

GhostCell — branded cell design

inq, 2026