dope_sys/memory/buffer/index.rs
1use std::num::NonZero;
2
3/// Exact native buffer identity and its nonzero storage bounds.
4pub trait Index: Copy + Eq {
5 type Error;
6
7 const ZERO: Self;
8
9 fn advance(&mut self);
10 fn is_within(self, capacity: NonZero<u16>) -> bool;
11 fn invalid(self, capacity: NonZero<u16>) -> Self::Error;
12}