o3 0.61.0

shared-nothing primitives
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use storage::provided;

use crate::{
    buffer,
    buffer::{storage, storage::provided::arena},
    mem::raw,
};

/// One edge retaining its concrete initialized registration and scope.
pub type Account<'d, L = std::cell::Cell<u32>> = raw::Owner<arena::entry::Registration<'d, L>>;

const _: () = assert!(size_of::<Account<'_>>() == size_of::<usize>());

impl<L: arena::Layout> buffer::Residency for Option<provided::Account<'_, L>> {
    fn resident(&self) -> usize {
        self.as_ref().map_or(0, |owner| owner.get().resident())
    }
}