Skip to main content

dope_sys/table/registry/
entry.rs

1use crate::table::change;
2
3/// A registered read retaining its operation identity and physical file slot.
4/// Identity, file, index, family, and numeric key conversions remain unchanged while registered.
5pub trait Entry: Sized {
6    type Id: Copy + Eq;
7    /// Numeric conversion equals `key(id())` for this entry's echo.
8    type Echo: Copy + Eq + Into<usize>;
9    type File: change::Id;
10    type Family: Copy + Eq;
11    type Call: Copy;
12
13    fn id(&self) -> Self::Id;
14    fn echo(&self) -> Self::Echo;
15    fn file(&self) -> Self::File;
16    fn index(&self) -> u32;
17    fn family(&self) -> Self::Family;
18    fn operation(&self) -> Self::Call;
19    fn key(id: Self::Id) -> usize;
20}