dope_sys/io/socket/route/
attach.rs1use std::{convert, os::fd};
2
3use crate::io::socket::route::{count::Index, install::Error};
4
5pub trait Attach: Sized {
7 fn try_attach(&self, socket: fd::BorrowedFd<'_>) -> Result<(), Error>;
8 fn try_filter(&mut self, key: Index, socket: fd::BorrowedFd<'_>) -> Result<(), Error>;
9}
10
11impl Attach for convert::Infallible {
12 fn try_attach(&self, _: fd::BorrowedFd<'_>) -> Result<(), Error> {
13 match *self {}
14 }
15
16 fn try_filter(&mut self, _: Index, _: fd::BorrowedFd<'_>) -> Result<(), Error> {
17 match *self {}
18 }
19}