mod chain;
use std::{num, pin};
pub use chain::Chain;
use crate::io::socket::option::tuning::{Occupied, device};
pub unsafe trait State<E: Copy, const N: usize>: Default {
type Occupied<'a>: Occupied<E>
where
Self: 'a;
fn bind(self: pin::Pin<&mut Self>) -> Option<Self::Occupied<'_>>;
unsafe fn values(
self: pin::Pin<&mut Self>,
target: E,
count: num::NonZero<u32>,
) -> &mut [libc::c_int; N];
}
pub trait Apply<B, H: device::raw::Host<B, N>, const N: usize>: device::Owner<H> {
unsafe fn try_apply(self) -> Result<H::Output, H::Error>;
}
pub trait Connect<B, H: device::raw::Connect<B, R, N>, R, const N: usize>:
device::Owner<H>
{
unsafe fn try_connect(self) -> Result<H::Output, H::Error>;
}