o3 0.62.0

shared-nothing primitives
Documentation
use crate::{
    buffer::storage::{self, provided, range},
    mem::{self, credit, rc},
};
use std::mem::size_of;

pub(in crate::buffer) type Bytes<'d, L = std::cell::Cell<u32>> =
    storage::Shared<Option<mem::raw::Owner<provided::raw::Registration<'d, L>>>>;

/// Exact state that prevented one provided owner from entering a domain.
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum Cause {
    Foreign,
    Exhausted { count: u32, limit: u32 },
    Budget(credit::Error),
    Retain(rc::Error),
}

const _: () = assert!(size_of::<Cause>() == 3 * size_of::<usize>());

/// Exact reason a provided owner could not enter one resident domain.
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum Error {
    Range(range::Error),
    Account(Cause),
}

const _: () = assert!(size_of::<Error>() == 4 * size_of::<usize>());