o3 0.62.0

shared-nothing primitives
Documentation
use std::{convert, mem};

use crate::depot::capacity;

/// The exact physical slot observation that rejected a lookup.
#[derive(Debug, PartialEq, Eq)]
pub enum Error<B = convert::Infallible, R = ()> {
    Index {
        index: u32,
        capacity: capacity::Count,
    },
    Free {
        index: u32,
    },
    Reserved {
        index: u32,
    },
    Retired {
        index: u32,
        retired: R,
    },
    Busy {
        index: u32,
        borrow: B,
    },
}

const _: () = {
    assert!(mem::size_of::<Error>() == 3 * mem::size_of::<u32>());
    assert!(mem::size_of::<Error<()>>() == mem::size_of::<Error>());
    assert!(mem::size_of::<Error<(), convert::Infallible>>() == mem::size_of::<Error>());
    assert!(
        mem::size_of::<Error<convert::Infallible, convert::Infallible>>()
            == mem::size_of::<Error>()
    );
};