use std::num;
use o3::{base::num::bounded, buffer::bytes::bounded::MAX};
pub unsafe trait Layout: Copy {
fn entries(self) -> num::NonZero<u16>;
fn capacity(self) -> num::NonZero<u32>;
}
pub unsafe trait Extent {
type Length: Copy
+ From<bounded::U32<0, { MAX as u32 }>>
+ Into<bounded::U32<0, { MAX as u32 }>>;
type Capacity: Copy + Into<num::NonZero<u32>>;
}
pub unsafe trait Receive: Layout {
type Extent: Extent;
fn limit(self) -> <Self::Extent as Extent>::Capacity;
}
pub unsafe trait Canary: Receive {
const LAYOUT: Self;
}