use std::os::fd;
use crate::{
Errno,
io::reactor::{
complete, read,
ready::delivery::entry::{Context, Create, Key},
retry,
},
};
pub trait Event<C: Context>:
Create<C::Outbound, C::Handle, Key = <C::Reader as read::Context>::Key, Output = Self>
+ complete::Event<Key = Key<C>>
+ Sized
{
fn opened(key: Key<C>, result: Result<fd::OwnedFd, Errno>) -> Self;
fn read(key: Key<C>, result: <C::Writer as retry::Context>::Outcome) -> Self;
fn written(key: Key<C>, result: <C::Writer as retry::Context>::Outcome) -> Self;
fn synced(key: Key<C>, result: <C::Writer as retry::Context>::Unit) -> Self;
const SHUTDOWN: Self;
}