dope_sys/io/socket/option/tuning/table.rs
1use std::pin;
2
3use crate::io::socket::option::tuning;
4
5/// Address-stable option states indexed by physical descriptor slots.
6pub trait Table<E: Copy, const N: usize>: tuning::Create + tuning::Quiesce {
7 type State: tuning::raw::State<E, N>;
8 type Occupied<'a>: tuning::Occupied<E>
9 where
10 Self: 'a;
11
12 fn bind(&mut self, index: u32) -> Result<Self::Occupied<'_>, tuning::Missing>;
13 fn get(&mut self, index: u32) -> Option<pin::Pin<&mut Self::State>>;
14
15 /// Makes a failed cancellation retryable without releasing its chain.
16 /// A late reply may only permit another attempt; it cannot clear a target.
17 fn retry_cancel(&mut self, index: u32);
18}