use storage::provided;
use crate::{
buffer,
buffer::{storage, storage::provided::arena},
mem::raw,
};
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())
}
}