Skip to main content

dope_sys/memory/buffer/
index.rs

1use std::num::NonZero;
2
3use o3::base::num::bounded;
4
5/// Exact native buffer identity and its nonzero storage bounds.
6pub trait Index: Copy + Eq {
7    const ZERO: Self;
8
9    fn advance(&mut self);
10    fn offset(self, stride: NonZero<u32>) -> bounded::U64<0, { u64::MAX }>;
11    fn is_within(self, capacity: NonZero<u16>) -> bool;
12}